Home > functions > device > meg > vb_meginfo_get_channel_number_whole.m

vb_meginfo_get_channel_number_whole

PURPOSE ^

get number of whole channel from MEGinfo struct and return it

SYNOPSIS ^

function Nchannel = vb_meginfo_get_channel_number_whole(meginfo, active_swt)

DESCRIPTION ^

 get number of whole channel from MEGinfo struct and return it
 [usage]
   Nchannel = vb_meginfo_get_channel_number_whole(meginfo)
 [input]
      meginfo : <required> <<struct>> MEG information
   active_swt : <optional> <<boolean>> [false]
              :  switch to return whether all the channels or only active
              :   true) only active channels
              :  false) all the channels
 [output]
     Nchannel : number of whole channel
 [note]
   
 [history]
   2007-06-28 (Sako) initial version
   2008-02-08 (Sako) modified according to new spec
   2008-05-01 (Sako) added active_swt

 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 Nchannel = vb_meginfo_get_channel_number_whole(meginfo, active_swt)
0002 % get number of whole channel from MEGinfo struct and return it
0003 % [usage]
0004 %   Nchannel = vb_meginfo_get_channel_number_whole(meginfo)
0005 % [input]
0006 %      meginfo : <required> <<struct>> MEG information
0007 %   active_swt : <optional> <<boolean>> [false]
0008 %              :  switch to return whether all the channels or only active
0009 %              :   true) only active channels
0010 %              :  false) all the channels
0011 % [output]
0012 %     Nchannel : number of whole channel
0013 % [note]
0014 %
0015 % [history]
0016 %   2007-06-28 (Sako) initial version
0017 %   2008-02-08 (Sako) modified according to new spec
0018 %   2008-05-01 (Sako) added active_swt
0019 %
0020 % Copyright (C) 2011, ATR All Rights Reserved.
0021 % License : New BSD License(see VBMEG_LICENSE.txt)
0022 
0023 % --- CHECK ARGUMENTS --- %
0024 if ~exist('meginfo', 'var'), meginfo = []; end
0025 if ~exist('active_swt', 'var'), active_swt = []; end
0026 [meginfo, active_swt] = inner_check_arguments(meginfo, active_swt);
0027 
0028 % --- MAIN PROCEDURE --------------------------------------------------------- %
0029 %
0030 Nchannel_meg = vb_meginfo_get_channel_number_meg(meginfo, active_swt);
0031 Nchannel_ext = vb_meginfo_get_channel_number_extra(meginfo, active_swt);
0032 Nchannel_ref = vb_meginfo_get_channel_number_refmg(meginfo, active_swt);
0033 Nchannel = Nchannel_meg + Nchannel_ext + Nchannel_ref;
0034 return;
0035 %
0036 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0037 
0038 % --- INNER FUNCTIONS -------------------------------------------------------- %
0039 %
0040 % --- inner_check_arguments()
0041 %
0042 function [meginfo, active_swt] = inner_check_arguments(meginfo, active_swt)
0043 func_ = mfilename;
0044 if isempty(meginfo)
0045   error('(%s)meginfo is a required parameter', func_);
0046 end
0047 
0048 if isempty(active_swt)
0049   active_swt = false;
0050 end
0051 return;
0052 %
0053 % --- end of inner_check_arguments()
0054 
0055 %
0056 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0057 
0058 %%% END OF FILE %%%

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