return label list of MAG_X channels by reading megfile [usage] [label_list] = vb_megfile_get_channel_label_magz(megfile) [input] megfile : <required> <<file>> MEG-MAT file [output] label_list : label list of MAG_X channel [note] @see vb_meginfo_get_channel_label_magz [history] 2022-06-03 (k_suzuki) initial version based on vb_megfile_get_channel_label_refmg Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [label_list] = vb_megfile_get_channel_label_magz(megfile) 0002 % return label list of MAG_X channels by reading megfile 0003 % [usage] 0004 % [label_list] = vb_megfile_get_channel_label_magz(megfile) 0005 % [input] 0006 % megfile : <required> <<file>> MEG-MAT file 0007 % [output] 0008 % label_list : label list of MAG_X channel 0009 % [note] 0010 % @see vb_meginfo_get_channel_label_magz 0011 % [history] 0012 % 2022-06-03 (k_suzuki) initial version based on vb_megfile_get_channel_label_refmg 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('megfile', 'var') megfile = []; end 0019 [megfile] = inner_check_arguments(megfile); 0020 0021 % --- MAIN PROCEDURE --------------------------------------------------------- % 0022 % 0023 label_list = []; 0024 0025 meginfo = vb_megfile_load_meginfo(megfile); 0026 if isempty(meginfo) 0027 return; 0028 end 0029 0030 label_list = vb_meginfo_get_channel_label_magz(meginfo); 0031 return; 0032 % 0033 % --- END OF MAIN PROCEDURE -------------------------------------------------- % 0034 0035 % --- INNER FUNCTIONS -------------------------------------------------------- % 0036 % 0037 % inner_check_arguments() 0038 % 0039 function [megfile] = inner_check_arguments(megfile) 0040 func_ = mfilename; 0041 if isempty(megfile) 0042 error('(%s)megfile is a required parameter', func_); 0043 end 0044 0045 if exist(megfile, 'file') ~= 2 0046 error('(%s)cannot find megfile : %s', func_, megfile); 0047 end 0048 return; 0049 % 0050 % --- end of inner_check_arguments() 0051 0052 % 0053 % --- END OF INNER FUNCTIONS ------------------------------------------------- % 0054 0055 %%% END OF FILE %%%