⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eeg_load_scan4_cnt_event.m

📁 Matlab下的EEG处理程序库
💻 M
字号:
function f = eeg_load_scan4_cnt_event(fid)

% 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
%

% $Revision: 1.2 $ $Date: 2003/03/02 03:20:43 $

% Licence:  GNU GPL, no express or implied warranties
% History:  2002, Sean.Fitzgibbon@flinders.edu.au
%           06/2002, Darren.Weber@flinders.edu.au
%                    adapted to eeg_toolbox
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





fseek(fid,886,'bof');           eventPos = fread(fid,1,'long');


fseek(fid,eventPos,'bof');      f.type   = fread(fid,1,'uchar');

                                f.size   = fread(fid,1,'long');
                                f.offset = fread(fid,1,'long');
                                

fseek(fid,f.offset,'cof');


for i = 1:(f.size/19),
    

    f.event(i).stimType   = fread(fid,1,'short');
    

    f.event(i).keyBoard   = fread(fid,1,'char');
    

    f.event(i).keyPad     = fread(fid,1,'bit4');
    

    f.event(i).Accept     = fread(fid,1,'bit4');
    

    f.event(i).offset     = fread(fid,1,'long');
    

    f.event(i).type       = fread(fid,1,'short');
    

    f.event(i).code       = fread(fid,1,'short');
    

    f.event(i).latency    = fread(fid,1,'float');
    

    f.event(i).epochEvent = fread(fid,1,'char');
    

    f.event(i).accept     = fread(fid,1,'char');
    

    f.event(i).accuracy   = fread(fid,1,'char');
    

end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -