Home > functions > device > vb_info_get_Nchannel.m

vb_info_get_Nchannel

PURPOSE ^

<<getter>> return Nchannel field of MEGinfo or EEGinfo

SYNOPSIS ^

function Nch = vb_info_get_Nchannel(info)

DESCRIPTION ^

 <<getter>> return Nchannel field of MEGinfo or EEGinfo
 [usage]
   Nch = vb_info_get_Nchannel(info)
 [input]
   info : <required> <<struct>> MEGinfo or EEGinfo
 [output]
    Nch : value of Nchannel field
 [note]
   with no intelligent action
   *info struct must have "Nchannel" field if necessary
 [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 Nch = vb_info_get_Nchannel(info)
0002 % <<getter>> return Nchannel field of MEGinfo or EEGinfo
0003 % [usage]
0004 %   Nch = vb_info_get_Nchannel(info)
0005 % [input]
0006 %   info : <required> <<struct>> MEGinfo or EEGinfo
0007 % [output]
0008 %    Nch : value of Nchannel field
0009 % [note]
0010 %   with no intelligent action
0011 %   *info struct must have "Nchannel" field if necessary
0012 % [history]
0013 %   2008-04-14 (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 Nch = info.Nchannel;
0025 return;
0026 %
0027 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0028 
0029 % --- INNER FUNCTIONS -------------------------------------------------------- %
0030 %
0031 % --- inner_check_arguments()
0032 %
0033 function [info] = inner_check_arguments(info)
0034 func_ = mfilename;
0035 if isempty(info)
0036   error('(%s)info is a required parameter', func_);
0037 end
0038 
0039 if ~isfield(info, 'Nchannel')
0040   info.Nchannel = 0;
0041 end
0042 return;
0043 %
0044 % --- end of inner_check_arguments()
0045 %
0046 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0047 
0048 %%% END OF FILE %%%

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