mne_write_w_file1(filename, w) writes a binary 'w' file filename - name of file to write to w - a structure with the following fields: vertices - vector of vertex indices (1-based) data - vector of data values
0001 function err = mne_write_w_file1(filename, w) 0002 % mne_write_w_file1(filename, w) 0003 % 0004 % writes a binary 'w' file 0005 % 0006 % filename - name of file to write to 0007 % w - a structure with the following fields: 0008 % 0009 % vertices - vector of vertex indices (1-based) 0010 % data - vector of data values 0011 % 0012 0013 % 0014 % Author : Matti Hamalainen, MGH Martinos Center 0015 % License : BSD 3-clause 0016 % 0017 % Revision 1.5 2006/04/23 15:29:41 msh 0018 % Added MGH to the copyright 0019 % 0020 % Revision 1.4 2006/04/10 23:26:54 msh 0021 % Added fiff reading routines 0022 % 0023 % Revision 1.3 2005/12/05 20:23:21 msh 0024 % Added fiff_save_evoked. Improved error handling. 0025 % 0026 % Revision 1.2 2005/11/21 03:19:12 msh 0027 % Improved error handling 0028 % 0029 % Revision 1.1 2005/11/21 02:15:51 msh 0030 % Added more routines 0031 % 0032 0033 me='MNE:mne_write_w_file1'; 0034 if(nargin ~= 2) 0035 error(me,'usage: mne_write_w_file1(filename, w)'); 0036 return; 0037 end 0038 0039 try 0040 w.vertices = w.vertices - 1; 0041 mne_write_w_file(filename,w); 0042 catch 0043 w.vertices = w.vertices - 1; 0044 error(me,'%s',mne_omit_first_line(lasterr)); 0045 end 0046 0047 return;