Home > eeg > egis > egis_file_utils > put_tspecs_v.m

put_tspecs_v

PURPOSE ^

outchdr=put_tspecs_v(inspecs,chdr,cell,trial)

SYNOPSIS ^

function outchdr = put_tspecs_v(inspecs,chdr,cell,trial)

DESCRIPTION ^

outchdr=put_tspecs_v(inspecs,chdr,cell,trial)

Writes 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_tspecs_v.

Created 3/5/96 by BCR

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function outchdr = put_tspecs_v(inspecs,chdr,cell,trial)
0002 %outchdr=put_tspecs_v(inspecs,chdr,cell,trial)
0003 %
0004 %Writes 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_tspecs_v.
0009 %
0010 %Created 3/5/96 by BCR
0011 %
0012 
0013 %Call the script that defines the EGIS header constants
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;

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