spec_value=get_tspecs_v(cell_hdrs,cell,trial) Returns a vector which is all the EGIS trial-specifics from cell cell_num and trial trial_num. The source matrix cell_hdrs is returned as the second value of the function rd_ses_hdr_v. See Also:rd_ses_hdr_v, get_tspec_v. Created 3/95 by Brian Rakitin Modified 3/5/96 by BCR
0001 function specs = get_tspecs_v(chdr,cell,trial) 0002 %spec_value=get_tspecs_v(cell_hdrs,cell,trial) 0003 % 0004 %Returns a vector which is all the EGIS trial-specifics from cell 0005 %cell_num and trial trial_num. The source matrix cell_hdrs is 0006 %returned as the second value of the function rd_ses_hdr_v. 0007 % 0008 %See Also:rd_ses_hdr_v, get_tspec_v. 0009 % 0010 %Created 3/95 by Brian Rakitin 0011 %Modified 3/5/96 by BCR 0012 % 0013 0014 %Call the script that defines the EGIS header constants 0015 ses_hdr_offsets_v; 0016 0017 if ~(nargin==3 & nargout==1) 0018 error('Function get_tspecs_v requires 3 input and 1 output arguments.'); 0019 end 0020 0021 if cell > size(chdr,1) 0022 error(['Cell argument must be no greater than ' int2str(size(chdr,1))]); 0023 end 0024 0025 if trial > chdr(cell,NTrials) 0026 error(['Trial argument must be no greater than ' int2str(chdr(cell,NTrials))]); 0027 end 0028 0029 numspecs=floor(chdr(cell,LSpec)/2); 0030 tspec_offset = 6+((trial-1)*numspecs); 0031 specs = chdr(cell,tspec_offset:(tspec_offset+numspecs-1));