Home > vbmeg > functions > device > vb_info_get_Nrepeat.m

vb_info_get_Nrepeat

PURPOSE ^

<<getter>> return Nrepeat value of MEGinfo or EEGinfo

SYNOPSIS ^

function value = vb_info_get_Nrepeat(info)

DESCRIPTION ^

 <<getter>> return Nrepeat value of MEGinfo or EEGinfo
 [usage]
   value = vb_info_get_trial_number(info)
 [input]
    info : <required> <<struct>> MEGinfo or EEGinfo
 [output]
   value : value of Nrepeat field
 [note]
   if there is not Nrepeat field, return zero.
 [history]
   2008-04-15 (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 value = vb_info_get_Nrepeat(info)
0002 % <<getter>> return Nrepeat value of MEGinfo or EEGinfo
0003 % [usage]
0004 %   value = vb_info_get_trial_number(info)
0005 % [input]
0006 %    info : <required> <<struct>> MEGinfo or EEGinfo
0007 % [output]
0008 %   value : value of Nrepeat field
0009 % [note]
0010 %   if there is not Nrepeat field, return zero.
0011 % [history]
0012 %   2008-04-15 (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 value = info.Nrepeat;
0024 return;
0025 %
0026 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0027 
0028 % --- INNER FUNCTIONS -------------------------------------------------------- %
0029 %
0030 % --- inner_check_arguments()
0031 %
0032 function [info] = inner_check_arguments(info)
0033 func_ = mfilename;
0034 if isempty(info)
0035   error('(%s)info is a required parameter', func_);
0036 end
0037 
0038 if ~isfield(info, 'Nrepeat')
0039   info.Nrepeat = 0;
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