Home > functions > device > vb_info_set_channel_info.m

vb_info_set_channel_info

PURPOSE ^

set channel info field to the appropriate field name

SYNOPSIS ^

function info = vb_info_set_channel_info(info, channel_info)

DESCRIPTION ^

 set channel info field to the appropriate field name
 [usage]
   info = vb_info_set_channel_info(info, channel_info)
 [input]
   info : <required> <<struct>> MEGinfo or EEGinfo
   channel_info : <required> <<struct>> which has fields as follows
                :  .Active [Nchannel x 1 boolean]
                :  .Name   {Nchannel x 1}
                :  .Type   [Nchannel x 1]
                :  .ID     [Nchannel x 1]
                : if this is empty, empty data is set to the info
 [output]
   info : updated info (MEGinfo or EEGinfo)
 [note]

 [history]
   2009-07-07 (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 info = vb_info_set_channel_info(info, channel_info)
0002 % set channel info field to the appropriate field name
0003 % [usage]
0004 %   info = vb_info_set_channel_info(info, channel_info)
0005 % [input]
0006 %   info : <required> <<struct>> MEGinfo or EEGinfo
0007 %   channel_info : <required> <<struct>> which has fields as follows
0008 %                :  .Active [Nchannel x 1 boolean]
0009 %                :  .Name   {Nchannel x 1}
0010 %                :  .Type   [Nchannel x 1]
0011 %                :  .ID     [Nchannel x 1]
0012 %                : if this is empty, empty data is set to the info
0013 % [output]
0014 %   info : updated info (MEGinfo or EEGinfo)
0015 % [note]
0016 %
0017 % [history]
0018 %   2009-07-07 (Sako) initial version
0019 %
0020 % Copyright (C) 2011, ATR All Rights Reserved.
0021 % License : New BSD License(see VBMEG_LICENSE.txt)
0022 
0023 % --- CHECK ARGUMENTS --- %
0024 if ~exist('info', 'var'), info = []; end
0025 if ~exist('channel_info', 'var'), channel_info = []; end
0026 [info, channel_info] = inner_check_arguments(info, channel_info);
0027 
0028 % --- MAIN PROCEDURE --------------------------------------------------------- %
0029 %
0030 info.ChannelInfo = channel_info;
0031 return;
0032 %
0033 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0034 
0035 % --- INNER FUNCTIONS -------------------------------------------------------- %
0036 %
0037 % --- inner_check_arguments()
0038 %
0039 function [info, channel_info] = inner_check_arguments(info, channel_info)
0040 func_ = mfilename;
0041 if isempty(info)
0042   error('(%s) info is a required parameter', func_);
0043 end
0044 
0045 if isempty(channel_info)
0046   % require no action
0047 end
0048 return;
0049 %
0050 % --- end of inner_check_arguments()
0051 %
0052 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0053 
0054 %%% END OF FILE %%%

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