return label list of all channels by reading megfile [usage] [label_list] = vb_megfile_get_channel_label_whole(megfile, active_swt) [input] megfile : <required> <<file>> MEG-MAT file active_swt : <optional> <<boolean>> active switch [false] : true) active channels in MEG channels : false) all the channels in MEG channels [output] label_list : label list of all channels [note] @see vb_meginfo_get_channel_label_whole [history] 2007-07-18 (Sako) initial version 2008-05-01 (Sako) added active_swt Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [label_list] = vb_megfile_get_channel_label_whole(megfile, active_swt) 0002 % return label list of all channels by reading megfile 0003 % [usage] 0004 % [label_list] = vb_megfile_get_channel_label_whole(megfile, active_swt) 0005 % [input] 0006 % megfile : <required> <<file>> MEG-MAT file 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 % label_list : label list of all channels 0012 % [note] 0013 % @see vb_meginfo_get_channel_label_whole 0014 % [history] 0015 % 2007-07-18 (Sako) initial version 0016 % 2008-05-01 (Sako) added active_swt 0017 % 0018 % Copyright (C) 2011, ATR All Rights Reserved. 0019 % License : New BSD License(see VBMEG_LICENSE.txt) 0020 0021 % --- CHECK ARGUMENTS --- % 0022 if ~exist('megfile', 'var'), megfile = []; end 0023 if ~exist('active_swt', 'var'), active_swt = []; end 0024 [megfile, active_swt] = inner_check_arguments(megfile, active_swt); 0025 0026 % --- MAIN PROCEDURE --------------------------------------------------------- % 0027 % 0028 label_list = []; 0029 0030 meginfo = vb_megfile_load_meginfo(megfile); 0031 if isempty(meginfo) 0032 return; 0033 end 0034 0035 label_list = vb_meginfo_get_channel_label_whole(meginfo, active_swt); 0036 return; 0037 % 0038 % --- END OF MAIN PROCEDURE -------------------------------------------------- % 0039 0040 % --- INNER FUNCTIONS -------------------------------------------------------- % 0041 % 0042 % inner_check_arguments() 0043 % 0044 function [megfile, active_swt] = inner_check_arguments(megfile, active_swt) 0045 func_ = mfilename; 0046 if isempty(megfile) 0047 error('(%s)megfile is a required parameter', func_); 0048 end 0049 0050 if exist(megfile, 'file') ~= 2 0051 error('(%s)cannot find megfile : %s', func_, megfile); 0052 end 0053 0054 if isempty(active_swt) 0055 active_swt = false; 0056 end 0057 return; 0058 % 0059 % --- end of inner_check_arguments() 0060 0061 % 0062 % --- END OF INNER FUNCTIONS ------------------------------------------------- % 0063 0064 %%% END OF FILE %%%