Home > bioelectromagnetism > eeg_load_scan4_cnt_event.m

eeg_load_scan4_cnt_event

PURPOSE ^

eeg_load_scan4_cnt_event - Read Neuroscan 4.x Continuous EEG Events

SYNOPSIS ^

function f = eeg_load_scan4_cnt_event(fid)

DESCRIPTION ^

 eeg_load_scan4_cnt_event - Read Neuroscan 4.x Continuous EEG Events
 
 eventTable = eeg_load_scan4_cnt_event(fid)
               
   fid         -  File identifier

   eventTable  -  structure of event info

   Note: Developed with Scan 4.1 CNT files

   See also: eeg_load_scan4_cnt_data

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function f = eeg_load_scan4_cnt_event(fid)
0002 
0003 % eeg_load_scan4_cnt_event - Read Neuroscan 4.x Continuous EEG Events
0004 %
0005 % eventTable = eeg_load_scan4_cnt_event(fid)
0006 %
0007 %   fid         -  File identifier
0008 %
0009 %   eventTable  -  structure of event info
0010 %
0011 %   Note: Developed with Scan 4.1 CNT files
0012 %
0013 %   See also: eeg_load_scan4_cnt_data
0014 %
0015 
0016 % $Revision: 1.1 $ $Date: 2004/11/12 01:32:33 $
0017 
0018 % Licence:  GNU GPL, no express or implied warranties
0019 % History:  2002, Sean.Fitzgibbon@flinders.edu.au
0020 %           06/2002, Darren.Weber_at_radiology.ucsf.edu
0021 %                    adapted to eeg_toolbox
0022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0023 
0024 
0025 
0026 
0027 
0028 fseek(fid,886,'bof');           eventPos = fread(fid,1,'long');
0029 
0030 
0031 fseek(fid,eventPos,'bof');      f.type   = fread(fid,1,'uchar');
0032 
0033                                 f.size   = fread(fid,1,'long');
0034                                 f.offset = fread(fid,1,'long');
0035                                 
0036 
0037 fseek(fid,f.offset,'cof');
0038 
0039 
0040 for i = 1:(f.size/19),
0041     
0042 
0043     f.event(i).stimType   = fread(fid,1,'short');
0044     
0045 
0046     f.event(i).keyBoard   = fread(fid,1,'char');
0047     
0048 
0049     f.event(i).keyPad     = fread(fid,1,'bit4');
0050     
0051 
0052     f.event(i).Accept     = fread(fid,1,'bit4');
0053     
0054 
0055     f.event(i).offset     = fread(fid,1,'long');
0056     
0057 
0058     f.event(i).type       = fread(fid,1,'short');
0059     
0060 
0061     f.event(i).code       = fread(fid,1,'short');
0062     
0063 
0064     f.event(i).latency    = fread(fid,1,'float');
0065     
0066 
0067     f.event(i).epochEvent = fread(fid,1,'char');
0068     
0069 
0070     f.event(i).accept     = fread(fid,1,'char');
0071     
0072 
0073     f.event(i).accuracy   = fread(fid,1,'char');
0074     
0075 
0076 end

Generated on Mon 15-Aug-2005 15:36:19 by m2html © 2003