TEAP (Toolbox for Emotion Analysis using Physiological Signals) doc
save2mm.m
Go to the documentation of this file.
1 function [HDR] = save2mm(fn,MM,montage);
2 % SAVE2MM saves Matrix into MatrixMarket format
3 %
4 % HDR = save2mm(filename,M,comment);
5 %
6 % filename destination file
7 % M Matrix
8 %
9 % see also: SLOAD, getMontage, regress_eog, save2gdf
10 %
11 
12 %
13 % BioSig is free software: you can redistribute it and/or modify
14 % it under the terms of the GNU General Public License as published by
15 % the Free Software Foundation, either version 3 of the License, or
16 % (at your option) any later version.
17 %
18 % BioSig is distributed in the hope that it will be useful,
19 % but WITHOUT ANY WARRANTY; without even the implied warranty of
20 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 % GNU General Public License for more details.
22 %
23 % You should have received a copy of the GNU General Public License
24 % along with BioSig. If not, see <http://www.gnu.org/licenses/>.
25 
26 
27 % $Id$
28 % Copyright (C) 2010 by Alois Schloegl <a.schloegl@ieee.org>
29 % This file is part of the biosig project http://biosig.sf.net/
30 
31 
32 
33  [I,J,V] = find(MM);
34  fid = fopen(fn,'w+');
35  fprintf(fid,'%%%%MatrixMarket matrix coordinate real general\n');
36  fprintf(fid,'%% generated on %04i-%02i-%02i %02i:%02i:%02.0f\n',clock);
37 
38  if ischar(montage) m = montage; else m = '? (user specified)'; end;
39  fprintf(fid,'%% Spatial Filter for %s \n',m);
40  fprintf(fid,'%i %i %i\n',size(MM),length(V));
41 
42  for k = 1:length(V),
43  fprintf(fid,'%2i %2i %f\n',I(k),J(k),V(k));
44  end;
45  fclose(fid);
46 
47  HDR.Calib = MM;
48  HDR.FileName = fn;
49  HDR.TYPE = 'MatrixMarket';
save2mm
function save2mm(in fn, in MM, in montage)
save2gdf
function save2gdf(in arg1, in arg2, in arg3)
regress_eog
function regress_eog(in D, in ny, in nx)