0001 function outchdr = put_tspecs_v(inspecs,chdr,cell,trial)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 ses_hdr_offsets_v;
0015
0016 if ~(nargin==4 & nargout==1)
0017 error('Function get_tspecs_v requires 3 input and 1 output arguments.');
0018 end
0019
0020 if cell > size(chdr,1)
0021 error(['Cell argument must be no greater than ' int2str(size(chdr,1))]);
0022 end
0023
0024 if trial > chdr(cell,NTrials)
0025 error(['Trial argument must be no greater than ' int2str(chdr(cell,NTrials))]);
0026 end
0027
0028 if size(inspecs)~=floor(chdr(cell,LSpec)/2)
0029 error(['Input argument inspecs must be length ' int2str(floor(chdr(cell,LSpec)/2))]);
0030 end
0031
0032 numspecs=floor(chdr(cell,LSpec)/2);
0033 tspec_offset = 6+((trial-1)*numspecs);
0034 outchdr=chdr;
0035 outchdr(cell,tspec_offset:(tspec_offset+numspecs-1))=inspecs;