Home > vbmeg > functions > device > meg > vb_meginfo_get_channel_label_whole.m

vb_meginfo_get_channel_label_whole

PURPOSE ^

return label list of whole channels which include MEG and EXTRA

SYNOPSIS ^

function [labels, result] = vb_meginfo_get_channel_label_whole(meginfo, active_swt)

DESCRIPTION ^

 return label list of whole channels which include MEG and EXTRA
 [usage]
   [labels, result] = vb_meginfo_get_channel_label_whole(meginfo, active_swt)
 [input]
   meginfo : <required> <<struct>> MEG information
   active_swt : <optional> <<boolean>> active switch [false]
              :   true) active channels in MEG channels
              :  false) all the channels in MEG channels
 [output]
       labels : label list of all channels [N x 1]
       result : <<integer>> error code
              :  0) success
              :  1) bad meginfo
 [note]
   @see vb_meginfo_get_channel_label_meg.m
   @see vb_meginfo_get_channel_label_extra.m
   @see vb_meginfo_get_channel_label_refmg.m
 [history]
   2007-06-27 (Sako) initial version
   2008-02-01 (Sako) modified for new spec
   2008-04-16 (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 [labels, result] = vb_meginfo_get_channel_label_whole(meginfo, active_swt)
0002 % return label list of whole channels which include MEG and EXTRA
0003 % [usage]
0004 %   [labels, result] = vb_meginfo_get_channel_label_whole(meginfo, active_swt)
0005 % [input]
0006 %   meginfo : <required> <<struct>> MEG information
0007 %   active_swt : <optional> <<boolean>> active switch [false]
0008 %              :   true) active channels in MEG channels
0009 %              :  false) all the channels in MEG channels
0010 % [output]
0011 %       labels : label list of all channels [N x 1]
0012 %       result : <<integer>> error code
0013 %              :  0) success
0014 %              :  1) bad meginfo
0015 % [note]
0016 %   @see vb_meginfo_get_channel_label_meg.m
0017 %   @see vb_meginfo_get_channel_label_extra.m
0018 %   @see vb_meginfo_get_channel_label_refmg.m
0019 % [history]
0020 %   2007-06-27 (Sako) initial version
0021 %   2008-02-01 (Sako) modified for new spec
0022 %   2008-04-16 (Sako) added active_swt
0023 %
0024 % Copyright (C) 2011, ATR All Rights Reserved.
0025 % License : New BSD License(see VBMEG_LICENSE.txt)
0026 
0027 % --- CHECK ARGUMENTS --- %
0028 if ~exist('meginfo', 'var'), meginfo = []; end
0029 if ~exist('active_swt', 'var'), active_swt = []; end
0030 [meginfo, active_swt, result] = inner_check_arguments(meginfo, active_swt);
0031 
0032 if result ~= 0
0033   return;
0034 end
0035 
0036 % --- MAIN PROCEDURE --------------------------------------------------------- %
0037 %
0038 labels = [vb_meginfo_get_channel_label_meg(meginfo, active_swt)' ...
0039           vb_meginfo_get_channel_label_extra(meginfo, active_swt)' ...
0040           vb_meginfo_get_channel_label_refmg(meginfo, active_swt)'];
0041 % arrange to [N x 1]
0042 labels = vb_util_arrange_list(labels,0);
0043 return;
0044 %
0045 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0046 
0047 % --- INNER FUNCTIONS -------------------------------------------------------- %
0048 %
0049 % --- inner_check_arguments()
0050 %
0051 function [meginfo, active_swt, result] = ...
0052   inner_check_arguments(meginfo, active_swt)
0053 func_ = mfilename;
0054 result = 0;
0055 
0056 if isempty(meginfo)
0057   fprintf('(%s)meginfo is a required parameter\n', func_);
0058   result = 1;
0059   return;
0060 end
0061 
0062 if isempty(active_swt)
0063   active_swt = false;
0064 end
0065 return;
0066 %
0067 % --- end of inner_check_arguments()
0068 %
0069 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0070 
0071 %%% END OF FILE %%%

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