Home > functions > device > meg > vb_meginfo_set_extra_ch_gain.m

vb_meginfo_set_extra_ch_gain

PURPOSE ^

<setter> set gain of extra channel to the appropriate field of MEGinfo

SYNOPSIS ^

function [meg_info] = vb_meginfo_set_extra_ch_gain(meg_info, gain)

DESCRIPTION ^

 <setter> set gain of extra channel to the appropriate field of MEGinfo
 [usage]
   [meg_info] = vb_meginfo_set_extra_ch_gain(meg_info, gain)
 [input]
   meg_info : <optional> <<struct>> MEGinfo []
       gain : <optional> []
 [output]
   meg_info : <<struct>> updated MEGinfo
 [note]
   if meg_info is empty, this program creates new meg_info
 [history]
   2008-02-08 (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 [meg_info] = vb_meginfo_set_extra_ch_gain(meg_info, gain)
0002 % <setter> set gain of extra channel to the appropriate field of MEGinfo
0003 % [usage]
0004 %   [meg_info] = vb_meginfo_set_extra_ch_gain(meg_info, gain)
0005 % [input]
0006 %   meg_info : <optional> <<struct>> MEGinfo []
0007 %       gain : <optional> []
0008 % [output]
0009 %   meg_info : <<struct>> updated MEGinfo
0010 % [note]
0011 %   if meg_info is empty, this program creates new meg_info
0012 % [history]
0013 %   2008-02-08 (Sako) initial version
0014 %
0015 % Copyright (C) 2011, ATR All Rights Reserved.
0016 % License : New BSD License(see VBMEG_LICENSE.txt)
0017 
0018 % --- CHECK ARGUMENTS --- %
0019 if ~exist('meg_info', 'var'), meg_info = []; end
0020 if ~exist('gain', 'var'), gain = []; end
0021 [meg_info, gain] = inner_check_arguments(meg_info, gain);
0022 
0023 % --- MAIN PROCEDURE --------------------------------------------------------- %
0024 %
0025 meg_info.ExtraChannelInfo.gain = gain;
0026 return;
0027 %
0028 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0029 
0030 % --- INNER FUNCTIONS -------------------------------------------------------- %
0031 %
0032 function [meg_info, gain] = inner_check_arguments(meg_info, gain)
0033 
0034 if isempty(meg_info)
0035   meg_info.ExtraChannelInfo = [];
0036 end
0037 
0038 if isempty(gain)
0039   % require no action
0040 end
0041 return;
0042 %
0043 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0044 
0045 %%% END OF FILE %%%

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