set trial data. if you also want to update screen, call vb_timeseries_viewer_update_trial. [Usage] [obj] = vb_timeseries_viewer_set_trial(obj, trial_list); [Input] obj : vb_timeseries_viewer object. trial_list : trial list <<struct list>> trial_list(N).from .to .onset [Output] obj : updated vb_timeseries_viewer object. [See also] vb_timeseries_viewer_update_trial.m Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [obj] = vb_timeseries_viewer_set_trial(obj, trial_list) 0002 % set trial data. if you also want to update screen, 0003 % call vb_timeseries_viewer_update_trial. 0004 % 0005 % [Usage] 0006 % [obj] = vb_timeseries_viewer_set_trial(obj, trial_list); 0007 % 0008 % [Input] 0009 % obj : vb_timeseries_viewer object. 0010 % trial_list : trial list <<struct list>> 0011 % trial_list(N).from 0012 % .to 0013 % .onset 0014 % [Output] 0015 % obj : updated vb_timeseries_viewer object. 0016 % [See also] 0017 % vb_timeseries_viewer_update_trial.m 0018 % 0019 % Copyright (C) 2011, ATR All Rights Reserved. 0020 % License : New BSD License(see VBMEG_LICENSE.txt) 0021 0022 % 0023 % --- Previous check 0024 % 0025 if ~exist('obj', 'var') 0026 error('obj is a required parameter.'); 0027 end 0028 if ~exist('trial_list', 'var') 0029 error('trial_list is a required parameter.'); 0030 end 0031 0032 % 0033 % --- Main Procedure 0034 % 0035 for k=1:length(trial_list) 0036 % timeseriesviewer uses this field to memorize each trial is valid or not. 0037 trial_list(k).invalid = false; 0038 end 0039 obj.trial_list = trial_list; 0040 0041 % 0042 % --- After check 0043 % 0044 if nargout ~= 1 0045 error('you should receive updated vb_timeseries_viewer object.'); 0046 end