Home > eeg > egis > egis_file_utils > get_csdm_cell_off.m

get_csdm_cell_off

PURPOSE ^

function [cell_data_offsets]=get_csdm_cell_off(fhdr, chdr)

SYNOPSIS ^

function [cell_data_offsets]=get_csdm_cell_off(fhdr, chdr)

DESCRIPTION ^

function [cell_data_offsets]=get_csdm_cell_off(fhdr, chdr)

Returns the index to the beginning of each cell's data

 Modification history:
 1/10/96 PJ Adapted from get_cell_offsets, but now multiplying by
            size_data_value to reflect fact that we are writing floats

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [cell_data_offsets]=get_csdm_cell_off(fhdr, chdr)
0002 %function [cell_data_offsets]=get_csdm_cell_off(fhdr, chdr)
0003 %
0004 %Returns the index to the beginning of each cell's data
0005 %
0006 % Modification history:
0007 % 1/10/96 PJ Adapted from get_cell_offsets, but now multiplying by
0008 %            size_data_value to reflect fact that we are writing floats
0009 
0010 ave_hdr_offsets_v;
0011 
0012 size_data_value = 4;  % 4=float
0013 
0014 cell_data_offsets = zeros(1,fhdr(NCells));
0015 cum_cell_sizes = 0;
0016 
0017 for c = 1:fhdr(NCells)
0018     cell_data_offsets(c) = fhdr(LHeader) + cum_cell_sizes;
0019     cum_cell_sizes = cum_cell_sizes + chdr(c,NObs)*chdr(c,NPoints)*fhdr(NChan)*size_data_value;
0020 end
0021

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