Home > vbmeg > external > mne > mne_write_stc_file1.m

mne_write_stc_file1

PURPOSE ^

SYNOPSIS ^

function mne_write_stc_file1(filename,stc)

DESCRIPTION ^

 mne_write_stc_file1(filename,stc)
 
 writes an stc file

     filename      output file
     stc           a stucture containing the stc data with fields:

     tmin          The time of the first frame in seconds
     tstep         Time between frames in seconds
     vertices      Vertex indices (1 based)
     data          The data matrix nvert * ntime

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function mne_write_stc_file1(filename,stc)
0002 %
0003 % mne_write_stc_file1(filename,stc)
0004 %
0005 % writes an stc file
0006 %
0007 %     filename      output file
0008 %     stc           a stucture containing the stc data with fields:
0009 %
0010 %     tmin          The time of the first frame in seconds
0011 %     tstep         Time between frames in seconds
0012 %     vertices      Vertex indices (1 based)
0013 %     data          The data matrix nvert * ntime
0014 %
0015 
0016 %
0017 %
0018 %   Author : Matti Hamalainen, MGH Martinos Center
0019 %   License : BSD 3-clause
0020 %
0021 %
0022 %     $Id: mne_write_stc_file1.m 8776 2013-11-14 09:04:48Z roboos $
0023 %
0024 me='MNE:mne_write_stc_file1';
0025 if(nargin ~= 2)
0026    error(me,'usage: mne_write_stc_file1(filename, stc)');
0027 end
0028 
0029 stc.vertices = stc.vertices - 1;
0030 try
0031    mne_write_stc_file(filename,stc);
0032    stc.vertices = stc.vertices + 1;
0033 catch 
0034    stc.vertices = stc.vertices - 1; 
0035    error(me,'%s',mne_omit_first_line(lasterr));
0036 end
0037 
0038 return;
0039 
0040

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005