return post-trigger from current info struct [usage] [posttrigger] = vb_info_get_post_trigger(info) [input] info : <required> <<struct>> EEGinfo or MEGinfo(temporary) [output] posttrigger : post-trigger value of current info struct [note] MEGinfo does not exactly have post-trigger field. [hisotory] 2007-08-02 (Sako) initial version Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [posttrigger] = vb_info_get_post_trigger(info) 0002 % return post-trigger from current info struct 0003 % [usage] 0004 % [posttrigger] = vb_info_get_post_trigger(info) 0005 % [input] 0006 % info : <required> <<struct>> EEGinfo or MEGinfo(temporary) 0007 % [output] 0008 % posttrigger : post-trigger value of current info struct 0009 % [note] 0010 % MEGinfo does not exactly have post-trigger field. 0011 % [hisotory] 0012 % 2007-08-02 (Sako) initial version 0013 % 0014 % Copyright (C) 2011, ATR All Rights Reserved. 0015 % License : New BSD License(see VBMEG_LICENSE.txt) 0016 0017 % --- CHECK ARGUMENTS --- % 0018 if ~exist('info', 'var') info = []; end 0019 [info] = inner_check_arguments(info); 0020 0021 % --- MAIN PROCEDURE --------------------------------------------------------- % 0022 % 0023 func_ = mfilename; 0024 0025 my_measurement = vb_info_get_measurement(info); 0026 0027 switch my_measurement 0028 case 'EEG' 0029 posttrigger = vb_eeginfo_get_post_trigger(info); 0030 case 'MEG' 0031 posttrigger = vb_meginfo_get_post_trigger(info); 0032 otherwise 0033 error('(%s)unexpected measurement : %s', func_, my_measurement); 0034 end 0035 return; 0036 % 0037 % --- END OF MAIN PROCEDURE -------------------------------------------------- % 0038 0039 % --- INNER FUNCTIONS -------------------------------------------------------- % 0040 % 0041 % --- inner_check_arguments() 0042 % 0043 function [info] = inner_check_arguments(info) 0044 func_ = mfilename; 0045 if isempty(info) 0046 error('(%s)info is a required parameter', func_); 0047 end 0048 return; 0049 % 0050 % --- end of inner_check_arguments() 0051 % 0052 % --- END OF INNER FUNCTIONS ------------------------------------------------- % 0053 0054 %%% END OF FILE %%%