0001 function [ave_chdr] = sesfhdr2avetspecs(ses_fhdr, ave_chdr)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 ses_hdr_offsets_v; ave_hdr_offsets_v;
0014
0015 if size(ave_chdr,2) < 19
0016 ave_chdr = ave_chdr + zeros(size(ave_chdr,1), 19 - size(ave_chdr,2));
0017 end
0018
0019 if any(ave_chdr(:,LSpec) < 28)
0020 ave_chdr(:,LSpec) = ones(size(ave_chdr,1),1) * 28;
0021 end
0022 nrows = size(ave_chdr,1);
0023 ave_chdr(:,RunDateMo_Ave) = ones(nrows,1)*ses_fhdr(RunDateMo);
0024 ave_chdr(:,RunDateDay_Ave) = ones(nrows,1)*ses_fhdr(RunDateDay);
0025 ave_chdr(:,RunDateYr_Ave) = ones(nrows,1)*ses_fhdr(RunDateYr);
0026 ave_chdr(:,RunTimeHr_Ave) = ones(nrows,1)*ses_fhdr(RunTimeHr);
0027 ave_chdr(:,RunTimeMin_Ave) = ones(nrows,1)*ses_fhdr(RunTimeMin);
0028 ave_chdr(:,RunTimeSec_Ave) = ones(nrows,1)*ses_fhdr(RunTimeSec);
0029 ave_chdr(:,SubjID_Ave) = ones(nrows,1)*ses_fhdr(SubjID);
0030 ave_chdr(:,Handed_Ave) = ones(nrows,1)*ses_fhdr(Handed);
0031 ave_chdr(:,Sex_Ave) = ones(nrows,1)*ses_fhdr(Sex);
0032 ave_chdr(:,Age_Ave) = ones(nrows,1)*ses_fhdr(Age);
0033 ave_chdr(:,ExperID_Ave) = ones(nrows,1)*ses_fhdr(ExperID);
0034 ave_chdr(:,EdVer_Ave) = ones(nrows,1)*ses_fhdr(EdVer);
0035 ave_chdr(:,CalFlag_Ave) = ones(nrows,1)*ses_fhdr(CalFlag);