trialdata = RD_ONETR_ALLCH(fileid, cell_data_offset, trial_num, nchan, npoints) Reads the raw (untransformed) data from all channels for a single trial from a single cell in the EGIS session file referred to by the file_id. Returns channels in columns
0001 function trialdata = read_trial_utility(fid, cell_data_offset, trial_num, nchan, npoints) 0002 % trialdata = RD_ONETR_ALLCH(fileid, cell_data_offset, trial_num, nchan, npoints) 0003 % 0004 % Reads the raw (untransformed) data from all channels for a single trial 0005 % from a single cell in the EGIS session file referred to by the file_id. 0006 % 0007 % Returns channels in columns 0008 0009 % Modification history: 0010 % 0011 % 2/15/95 PJ -- started work on module 0012 % 0013 0014 trial_offset = cell_data_offset + (trial_num-1)*nchan*npoints*2; 0015 0016 fseek(fid, trial_offset, 'bof'); 0017 0018 trialdata = fread(fid, [nchan, npoints],'int16'); 0019 trialdata = trialdata';