Home > vbmeg > functions > device > eeg > vb_eeginfo_get_pre_trigger.m

vb_eeginfo_get_pre_trigger

PURPOSE ^

return pre-trigger from current EEGinfo struct

SYNOPSIS ^

function [pretrigger] = vb_eeginfo_get_pre_trigger(EEGinfo)

DESCRIPTION ^

 return pre-trigger from current EEGinfo struct
 [usage]
   [pretrigger] = vb_eeginfo_get_pre_trigger(EEGinfo)
 [input]
      EEGinfo : <required> <<struct>> EEG information
 [output]
   pretrigger : pre-trigger value of current EEGinfo
 [note]
   if given EEGinfo does not have the appropriate field, return empty [].
 [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_eeginfo_get_pre_trigger(EEGinfo)
0002 % return pre-trigger from current EEGinfo struct
0003 % [usage]
0004 %   [pretrigger] = vb_eeginfo_get_pre_trigger(EEGinfo)
0005 % [input]
0006 %      EEGinfo : <required> <<struct>> EEG information
0007 % [output]
0008 %   pretrigger : pre-trigger value of current EEGinfo
0009 % [note]
0010 %   if given EEGinfo does not have the appropriate field, return empty [].
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('EEGinfo', 'var'), EEGinfo = []; end
0019 [EEGinfo] = inner_check_arguments(EEGinfo);
0020 
0021 % --- MAIN PROCEDURE --------------------------------------------------------- %
0022 %
0023 pretrigger = EEGinfo.Pretrigger;
0024 return;
0025 %
0026 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0027 
0028 % --- INNER FUNCTIONS -------------------------------------------------------- %
0029 %
0030 % --- inner_check_arguments()
0031 %
0032 function [EEGinfo] = inner_check_arguments(EEGinfo)
0033 
0034 func_ = mfilename;
0035 if isempty(EEGinfo)
0036   error('(%s)EEGinfo is a required parameter', func_);
0037 end
0038 
0039 if ~isfield(EEGinfo, 'Pretrigger')
0040   EEGinfo.Pretrigger = [];
0041 end
0042 return;
0043 %
0044 % --- end of inner_check_arguments()
0045 %
0046 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0047 
0048 %%% END OF FILE %%%

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