Home > vbmeg > functions > device > vb_info_get_pre_trigger.m

vb_info_get_pre_trigger

PURPOSE ^

return pre-trigger from current info struct

SYNOPSIS ^

function [pretrigger] = vb_info_get_pre_trigger(info)

DESCRIPTION ^

 return pre-trigger from current info struct
 [usage]
   [pretrigger] = vb_info_get_pre_trigger(info)
 [input]
          info : <required> <<struct>> EEGinfo or MEGinfo
 [output]
   pretrigger : pre-trigger value of current info struct
 [note]
   @see vb_meginfo_get_pre_trigger.m
   @see vb_eeginfo_get_pre_trigger.m
 [hisotory]
   2007-08-02 (Sako) initial version

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

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

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