Home > functions > device > meg > vb_megfile_get_channel_label_meg.m

vb_megfile_get_channel_label_meg

PURPOSE ^

return label list of MEG channels by reading megfile

SYNOPSIS ^

function [label_list] = vb_megfile_get_channel_label_meg(megfile)

DESCRIPTION ^

 return label list of MEG channels by reading megfile
 [usage]
   [label_list] = vb_megfile_get_channel_label_meg(megfile)
 [input]
   megfile : <required> <<file>> MEG-MAT file
 [output]
   label_list : label list of MEG channel
 [note]
   @see vb_meginfo_get_channel_label_meg
 [history]
   2007-07-18 (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 [label_list] = vb_megfile_get_channel_label_meg(megfile)
0002 % return label list of MEG channels by reading megfile
0003 % [usage]
0004 %   [label_list] = vb_megfile_get_channel_label_meg(megfile)
0005 % [input]
0006 %   megfile : <required> <<file>> MEG-MAT file
0007 % [output]
0008 %   label_list : label list of MEG channel
0009 % [note]
0010 %   @see vb_meginfo_get_channel_label_meg
0011 % [history]
0012 %   2007-07-18 (Sako) initial version
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_meg(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 %%%

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