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

vb_meginfo_get_extra_ch_gain

PURPOSE ^

<getter> return gain of extra channel from MEGinfo

SYNOPSIS ^

function gain = vb_meginfo_get_extra_ch_gain(meg_info)

DESCRIPTION ^

 <getter> return gain of extra channel from MEGinfo
 [usage]
   gain = vb_meginfo_get_extra_ch_gain(meg_info)
 [input]
   meg_info : <required> <<struct>> MEGinfo
 [output]
   gain : gain of extra channel
 [note]

 [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 gain = vb_meginfo_get_extra_ch_gain(meg_info)
0002 % <getter> return gain of extra channel from MEGinfo
0003 % [usage]
0004 %   gain = vb_meginfo_get_extra_ch_gain(meg_info)
0005 % [input]
0006 %   meg_info : <required> <<struct>> MEGinfo
0007 % [output]
0008 %   gain : gain of extra channel
0009 % [note]
0010 %
0011 % [history]
0012 %   2008-02-08 (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') ...
0024     || ~isfield(meg_info.ExtraChannelInfo, 'gain')
0025   gain = [];
0026   return;
0027 end
0028 
0029 gain = meg_info.ExtraChannelInfo.gain;
0030 return;
0031 %
0032 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0033 
0034 % --- INNER FUNCTIONS -------------------------------------------------------- %
0035 %
0036 % --- inner_check_arguments()
0037 %
0038 function [meg_info] = inner_check_arguments(meg_info)
0039 func_ = mfilename;
0040 if isempty(meg_info)
0041   error('(%s)meg_info is a required parameter', func_);
0042 end
0043 return;
0044 %
0045 % --- end of inner_check_arguments()
0046 %
0047 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0048 
0049 %%% END OF FILE %%%

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