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

vb_meginfo_get_channel_id_extra

PURPOSE ^

return id list of extra channels

SYNOPSIS ^

function id_list = vb_meginfo_get_channel_id_extra(meg_info)

DESCRIPTION ^

 return id list of extra channels
 [usage]
   id_list = vb_meginfo_get_channel_id_extra(meg_info)
 [input]
      meg_info : <required> <<struct>> MEGinfo which has 'ExtraChannelInfo'
 [output]
   id_list : ExtraChannelInfo.Channel_id
 [note]
   return value includes reference channels if exist
 [history]
   2008-04-17 (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 id_list = vb_meginfo_get_channel_id_extra(meg_info)
0002 % return id list of extra channels
0003 % [usage]
0004 %   id_list = vb_meginfo_get_channel_id_extra(meg_info)
0005 % [input]
0006 %      meg_info : <required> <<struct>> MEGinfo which has 'ExtraChannelInfo'
0007 % [output]
0008 %   id_list : ExtraChannelInfo.Channel_id
0009 % [note]
0010 %   return value includes reference channels if exist
0011 % [history]
0012 %   2008-04-17 (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('meg_info', 'var'), meg_info = []; end
0019 [meg_info] = inner_check_arguments(meg_info);
0020 
0021 % --- MAIN PROCEDURE --------------------------------------------------------- %
0022 %
0023 if ~isfield(meg_info.ExtraChannelInfo, 'Channel_id')
0024   id_list = [];
0025 else
0026   id_list = meg_info.ExtraChannelInfo.Channel_id;
0027 end
0028 return;
0029 %
0030 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0031 
0032 % --- INNER FUNCTIONS -------------------------------------------------------- %
0033 %
0034 % --- inner_check_arguments()
0035 %
0036 function [meg_info, ref_swt] = inner_check_arguments(meg_info, ref_swt)
0037 func_ = mfilename;
0038 if isempty(meg_info)
0039   error('(%s)meg_info is a required parameter', func_);
0040 end
0041 
0042 if ~isfield(meg_info, 'ExtraChannelInfo')
0043   error('(%s)meg_info must have ExtraChannelInfo field', func_);
0044 end
0045 return;
0046 %
0047 % --- end of inner_check_arguments()
0048 %
0049 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0050 
0051 %%% END OF FILE %%%

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