?? fefopen.m
字號(hào):
function [HDR]=fefopen(arg1)
% FEFOPEN opens and reads FEF file
%
% HDR=fefopen(HDR)
%
%
% see also: SOPEN
%
% References:
% <A HREF="ftp://sigftp.cs.tut.fi/pub/eeg-data/standards/cenf060.zip ">About CEN/TC251</A>
% $Revision: 1.2 $
% $Id: fefopen.m,v 1.2 2004/07/01 09:22:49 schloegl Exp $
% Copyright (c) 1998, 2004 Alois Schloegl
% a.schloegl@ieee.org
% This is part of the BIOSIG-toolbox http://biosig.sf.net/
% This library is free software; you can redistribute it and/or
% modify it under the terms of the GNU Library General Public
% License as published by the Free Software Foundation; either
% Version 2 of the License, or (at your option) any later version.
%
% This library is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
% Library General Public License for more details.
%
% You should have received a copy of the GNU Library General Public
% License along with this library; if not, write to the
% Free Software Foundation, Inc., 59 Temple Place - Suite 330,
% Boston, MA 02111-1307, USA.
if ischar(arg1)
HDR.FILE.OPEN = 0;
HDR.FileName = arg1;
HDR.FILE.FID = fopen(HDR.FileName,'r');
fseek(HDR.FILE.FID,32,'bof'); % skip preamble
else
HDR = arg1;
end;
TYP_OID16 = 'uint16';
N = 0;
tag=fread(HDR.FILE.FID,1,TYP_OID16);
len=fread(HDR.FILE.FID,1,'uint16');
while ~feof(HDR.FILE.FID),
value=fread(HDR.FILE.FID,len,'char');
tmp.TAG = sprintf('%x',tag);
tmp.LEN = len;
tmp.VAL = value(1:min(len,10))';
if tag>0,
N = N+1;
HDR.tag{N} = tmp;
end;
tag=fread(HDR.FILE.FID,1,TYP_OID16);
len=fread(HDR.FILE.FID,1,'uint16');
end;
if ~HDR.FILE.OPEN,
fclose(HDR.FILE.FID);
end;
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -