TEAP (Toolbox for Emotion Analysis using Physiological Signals) doc
wscore2event.m
Go to the documentation of this file.
1 function [EVENT,cc] = wscore2event(f0,fc)
2 % WSCORE2EVENT loads WSCORE event files
3 % and converts the data into event information
4 %
5 % EVENT = wscore2event(f0,fc)
6 % f0 event file
7 % fc event codes
8 %
9 % see also: SOPEN, SREAD, SSEEK, STELL, SCLOSE, SWRITE, SEOF
10 %
11 % Reference(s):
12 % [1] Artifact database of sleep EEG. Available online http://www.dpmi.tu-graz.ac.at/ADB/
13 %
14 % [2] A. Schlögl, P. Anderer, M.-J. Barbanoj, G. Klösch,G. Gruber, J.L. Lorenzo, O. Filz, M. Koivuluoma, I. Rezek, S.J. Roberts,A. Värri, P. Rappelsberger, G. Pfurtscheller, G. Dorffner
15 % Artifact processing of the sleep EEG in the "SIESTA"-project,
16 % Proceedings EMBEC'99, Part II, pp.1644-1645, 4-7. Nov. 1999,Vienna, Austria.
17 % [3] A. Schlögl, P. Anderer, S.J. Roberts, M. Pregenzer, G.Pfurtscheller.
18 % Artefact detection in sleep EEG by the use of Kalman filtering.
19 % Proceedings EMBEC'99, Part II, pp.1648-1649, 4-7. Nov. 1999,Vienna, Austria.
20 % [4] A. Schlögl, P. Anderer, M.-J. Barbanoj, G. Dorffner, G. Gruber, G. Klösch, J.L. Lorenzo, P. Rappelsberger, G. Pfurtscheller.
21 % Artifacts in the sleep EEG - A database for the evaluation of automatedprocessing methods.
22 % Proceedings of the Third International Congress of the World Federation of Sleep Research Societies (WFSRS). Editors: H. Schulz. P.L. Parmeggiani, and M. Chase. Sleep Research Online 1999:2 (Supplement 1), p. 586.
23 
24 
25 
26 % This program is free software; you can redistribute it and/or
27 % modify it under the terms of the GNU General Public License
28 % as published by the Free Software Foundation; either version 2
29 % of the License, or (at your option) any later version.
30 %
31 % This program is distributed in the hope that it will be useful,
32 % but WITHOUT ANY WARRANTY; without even the implied warranty of
33 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 % GNU General Public License for more details.
35 %
36 % You should have received a copy of the GNU General Public License
37 % along with this program; if not, write to the Free Software
38 % Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 
40 % $Revision: 1.1 $
41 % $Id: wscore2event.m 2205 2009-10-27 12:18:15Z schloegl $
42 % (C) 1997-2004 by Alois Schloegl <a.schloegl@ieee.org>
43 % This is part of the BIOSIG-toolbox http://biosig.sf.net/
44 
45 
46 if nargin>1,
47  k = 0;
48  fid = fopen(fc,'r')
49  while ~feof(fid),
50  k = k+1;
51  s=fgetl(fid);
52  [t1,s]=strtok(s);
53  %[t2,s]=strtok(s);
54  EVENT.CodeDesc{k,1}=s(2:end);
55  EVENT.CodeIndex(k,1)=str2double(t1);
56  end;
57  fclose(fid);
58 end;
59 
60 k = 0;
61 fid = fopen(f0,'r');
62 while ~feof(fid),
63  k = k+1;
64  s=fgetl(fid);
65  [t1,s]=strtok(s);
66  [t2,s]=strtok(s);
67  EVENT.POS(k,1)=str2double(t1);
68  EVENT.TYP(k,1)=str2double(t2);
69 end;
70 fclose(fid);
71 
str2double
function str2double(in s, in cdelim, in rdelim, in ddelim)
wscore2event
function wscore2event(in f0, in fc)