Home > eeg > egis > egis_file_utils > load_egis_ave.m

load_egis_ave

PURPOSE ^

ave = load_egis_ave(fname);

SYNOPSIS ^

function ave = load_egis_ave(fname)

DESCRIPTION ^

 ave = load_egis_ave(fname);

 Loads entire EGIS .ave or .gave file

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ave = load_egis_ave(fname)
0002 % ave = load_egis_ave(fname);
0003 %
0004 % Loads entire EGIS .ave or .gave file
0005 %
0006 
0007 
0008 % 01/24/00 PJ
0009 byte_sex = 'ieee-be';
0010 
0011 ave_hdr_offsets_v;
0012 scaling_factor = 500;
0013 
0014 fid = fopen(fname, 'rb', byte_sex);
0015 [d.fhdr,d.chdr,d.ename,d.czeros,d.cgains,d.cnames,d.fcom,d.ftext, coff]=rd_egis_hdr_v(fid);
0016 
0017 d.data = zeros(d.chdr(1,NPoints),d.fhdr(NChan),size(d.chdr,1));
0018 
0019 for icell = 1:size(d.chdr,1)
0020   d.data(:,:,icell) = rd_onetr_allch(fid, coff(icell), 1, d.fhdr(NChan), d.chdr(icell,NPoints))/scaling_factor;
0021 end
0022 
0023 fclose(fid);
0024 
0025 ave = d;

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