TEAP (Toolbox for Emotion Analysis using Physiological Signals) doc
loadlexi.m
Go to the documentation of this file.
1 function [s,HDR]=loadlexi(filename);
2 % LOADLEXI loads LEXICORE EEG data
3 %
4 % [data,HDR]=loadlexi(filename);
5 %
6 %
7 
8 % $Id: loadlexi.m 2205 2009-10-27 12:18:15Z schloegl $
9 % Copyright (C) 2009 Alois Schloegl <a.schloegl@ieee.org>
10 % This is part of the BIOSIG-toolbox http://biosig.sf.net/
11 
12 % BioSig is free software; you can redistribute it and/or
13 % modify it under the terms of the GNU Library General Public
14 % License as published by the Free Software Foundation; either
15 % Version 3 of the License, or (at your option) any later version.
16 
17 
18 warning('LOADLEXI is experimental and not well tested. ')
19 %% The solution is based on a single data file, with the comment:
20 %% "It was used to create a QEEG. It might have been collected
21 %% on an older Lexicore - I don't know. That was 4 years ago [in 2005]."
22 
23 
24 HDR.TYPE = 'LEXICORE';
25 fid = fopen(filename,'r','ieee-le');
26 HDR.H1 = fread(fid,[1,128],'uint8')';
27 HDR.data = fread(fid,[24,inf],'int16')';
28 fclose(fid);
29 
30 [HDR.NRec]=size(HDR.data,1);
31 HDR.NS = 20;
32 HDR.SPR = 1;
33 HDR.QEEG.status = HDR.data(:,21:24);
34 s = HDR.data(:,1:20);
35 
36 %% unkwown parameters
37 HDR.SampleRate = NaN;
38 HDR.FLAG.UCAL = 1; % data is not scaled
39 HDR.PhysDimCode = zeros(1,HDR.NS);
40 HDR.Cal = ones(1,HDR.NS);
41 HDR.Off = zeros(1,HDR.NS);
42 HDR.Calib = sparse([HDR.Off;diag(HDR.Cal)]);
43 HDR.Label = repmat({' '},HDR.NS,1);
44 HDR.EVENT.TYP = [];
45 HDR.EVENT.POS = [];
loadlexi
function loadlexi(in filename)