Home > functions > device > meg > vb_meginfo_get_pre_trigger.m

vb_meginfo_get_pre_trigger

PURPOSE ^

return pre-trigger from current MEGinfo struct

SYNOPSIS ^

function [pretrigger] = vb_meginfo_get_pre_trigger(MEGinfo)

DESCRIPTION ^

 return pre-trigger from current MEGinfo struct
 [usage]
   [pretrigger] = vb_meginfo_get_pre_trigger(MEGinfo)
 [input]
      MEGinfo : <required> <<struct>> MEG information
 [output]
   pretrigger : pre-trigger value of current MEGinfo
 [note]
   incorrect spelling 'Pretriger'
   if given MEGinfo does not have the appropriate field, return empty [].
 [hisotory]
   2007-06-29 (Sako) initial version
   2007-08-02 (Sako) rename function name from 'pretrigger' to 'pre_trigger'
   2008-01-29 (Sako) renewed due to new specification

 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_meginfo_get_pre_trigger(MEGinfo)
0002 % return pre-trigger from current MEGinfo struct
0003 % [usage]
0004 %   [pretrigger] = vb_meginfo_get_pre_trigger(MEGinfo)
0005 % [input]
0006 %      MEGinfo : <required> <<struct>> MEG information
0007 % [output]
0008 %   pretrigger : pre-trigger value of current MEGinfo
0009 % [note]
0010 %   incorrect spelling 'Pretriger'
0011 %   if given MEGinfo does not have the appropriate field, return empty [].
0012 % [hisotory]
0013 %   2007-06-29 (Sako) initial version
0014 %   2007-08-02 (Sako) rename function name from 'pretrigger' to 'pre_trigger'
0015 %   2008-01-29 (Sako) renewed due to new specification
0016 %
0017 % Copyright (C) 2011, ATR All Rights Reserved.
0018 % License : New BSD License(see VBMEG_LICENSE.txt)
0019 
0020 % --- CHECK ARGUMENTS --- %
0021 if ~exist('MEGinfo', 'var'), MEGinfo = []; end
0022 [MEGinfo] = inner_check_arguments(MEGinfo);
0023 
0024 % --- MAIN PROCEDURE --------------------------------------------------------- %
0025 %
0026 pretrigger = [];
0027 
0028 if isfield(MEGinfo, 'Pretriger')
0029   pretrigger = MEGinfo.Pretriger;
0030 elseif isfield(MEGinfo, 'Pretrigger')
0031   pretrigger = MEGinfo.Pretrigger;
0032 end
0033 return;
0034 %
0035 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0036 
0037 % --- INNER FUNCTIONS -------------------------------------------------------- %
0038 %
0039 % --- inner_check_arguments()
0040 %
0041 function [MEGinfo] = inner_check_arguments(MEGinfo)
0042 
0043 func_ = mfilename;
0044 if isempty(MEGinfo)
0045   error('(%s)MEGinfo is a required parameter', func_);
0046 end
0047 return;
0048 %
0049 % --- end of inner_check_arguments()
0050 %
0051 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0052 
0053 %%% END OF FILE %%%

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005