Overwrite pretrigger of MEG data [usage] vb_megfile_write_pretrigger(megfile, pretrigger) [input] megfile : <required> <<file>> .meg.mat file as base and this is updated pretrigger : <required> pretrigger [output] none [note] If the given megfile has old fashioned field name, this function replaces it with new one. --- History 2008-12-04 Taku Yoshioka 2010-01-19 (Sako) replaced vb_load_meg_info with vb_load_measurement_info 2010-01-26 (Sako) rename Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function vb_megfile_write_pretrigger(megfile, pretrigger) 0002 % Overwrite pretrigger of MEG data 0003 % [usage] 0004 % vb_megfile_write_pretrigger(megfile, pretrigger) 0005 % [input] 0006 % megfile : <required> <<file>> .meg.mat file as base and this is updated 0007 % pretrigger : <required> pretrigger 0008 % [output] 0009 % none 0010 % [note] 0011 % If the given megfile has old fashioned field name, 0012 % this function replaces it with new one. 0013 % --- History 0014 % 2008-12-04 Taku Yoshioka 0015 % 2010-01-19 (Sako) replaced vb_load_meg_info with vb_load_measurement_info 0016 % 2010-01-26 (Sako) rename 0017 % 0018 % Copyright (C) 2011, ATR All Rights Reserved. 0019 % License : New BSD License(see VBMEG_LICENSE.txt) 0020 0021 MEGinfo = vb_load_measurement_info(megfile); 0022 if isfield(MEGinfo,'Pretriger'), 0023 MEGinfo = rmfield(MEGinfo,'Pretriger'); 0024 end 0025 MEGinfo.Pretrigger = pretrigger; 0026 vb_save(megfile,'MEGinfo');