Home > vbmeg > functions > device > vb_info_get_active_trial.m

vb_info_get_active_trial

PURPOSE ^

<<getter>> return active trial field from MEGinfo or EEGinfo

SYNOPSIS ^

function [active_trial] = vb_info_get_active_trial(info)

DESCRIPTION ^

 <<getter>> return active trial field from MEGinfo or EEGinfo
 [usage]
   [active_trial] = vb_info_get_active_trial(info)
 [input]
           info : <required> <<struct>> MEGinfo or EEGinfo
 [output]
   active_trial : active trial field as it is
 [note]
 
 [history]
   2008-04-14 (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 [active_trial] = vb_info_get_active_trial(info)
0002 % <<getter>> return active trial field from MEGinfo or EEGinfo
0003 % [usage]
0004 %   [active_trial] = vb_info_get_active_trial(info)
0005 % [input]
0006 %           info : <required> <<struct>> MEGinfo or EEGinfo
0007 % [output]
0008 %   active_trial : active trial field as it is
0009 % [note]
0010 %
0011 % [history]
0012 %   2008-04-14 (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 if ~isfield(info, 'ActiveTrial')
0024   active_trial = [];
0025   return;
0026 end
0027 active_trial = info.ActiveTrial;
0028 return;
0029 %
0030 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0031 
0032 % --- INNER FUNCTIONS -------------------------------------------------------- %
0033 %
0034 % --- inner_check_arguments()
0035 %
0036 function [info] = inner_check_arguments(info)
0037 func_ = mfilename;
0038 if isempty(info)
0039   error('(%s)info is a required parameter', func_);
0040 end
0041 return;
0042 %
0043 % --- end of inner_check_arguments()
0044 %
0045 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0046 
0047 %%% END OF FILE %%%

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