Home > eeg > egis > egis_file_utils > rd_onecell.m

rd_onecell

PURPOSE ^

function [celldata] = rd_onecell_allchan(fid, fhdr, chdr, cellnum)

SYNOPSIS ^

function [celldata] = rd_onecell_allchan(fid, fhdr, chdr, cellnum)

DESCRIPTION ^

function [celldata] = rd_onecell_allchan(fid, fhdr, chdr, cellnum)

Read in all the data for a given cell

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [celldata] = rd_onecell_allchan(fid, fhdr, chdr, cellnum)
0002 %function [celldata] = rd_onecell_allchan(fid, fhdr, chdr, cellnum)
0003 %
0004 %Read in all the data for a given cell
0005 %
0006 
0007 if fhdr(2) == -1
0008   ave_hdr_offsets_v;
0009 else
0010   ses_hdr_offsets_v;
0011 end
0012 
0013 celldata = zeros(chdr(cellnum, NObs)*chdr(cellnum, NPoints), fhdr(NChan));
0014 
0015 cell_data_offsets = get_cell_offsets(fhdr, chdr);
0016 
0017 for t = 1:chdr(cellnum, NObs)
0018     celldata((t-1)*chdr(cellnum, NPoints)+1:t*chdr(cellnum, NPoints),:) = rd_onetr_allch(fid, cell_data_offsets(cellnum), t, fhdr(NChan), chdr(cellnum,NPoints));
0019 end

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003