1 function [HDR] =
save2mm(fn,MM,montage);
2 % SAVE2MM saves Matrix into MatrixMarket format
4 % HDR =
save2mm(filename,M,comment);
6 % filename destination file
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.
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.
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/>.
28 % Copyright (C) 2010 by Alois Schloegl <a.schloegl@ieee.org>
29 % This file is part of the biosig project http:
35 fprintf(fid,
'%%%%MatrixMarket matrix coordinate real general\n');
36 fprintf(fid,
'%% generated on %04i-%02i-%02i %02i:%02i:%02.0f\n',clock);
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));
43 fprintf(fid,
'%2i %2i %f\n',I(k),J(k),V(k));
49 HDR.TYPE =
'MatrixMarket';