0001 function ave = load_egis_ave(fname)
0002
0003
0004
0005
0006
0007
0008
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;