set initial sensor weight for refmg channels [usage] [meg_info] = vb_meginfo_init_sensor_weight_refmg(meg_info, n_ch) [input] meg_info : <required> <<struct>> MEGinfo which will be updated n_ch : <required> number of refmg channels [output] meg_info : <<struct>> updated MEGinfo [note] initial value is eye(n_ch), n_ch by n_ch identity matrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 @see vb_meginfo_set_sensor_weight_refmg.m [history] 2011-07-20 (Sako) initial version
0001 function [meg_info] = vb_meginfo_init_sensor_weight_refmg(meg_info, n_ch) 0002 % set initial sensor weight for refmg channels 0003 % [usage] 0004 % [meg_info] = vb_meginfo_init_sensor_weight_refmg(meg_info, n_ch) 0005 % [input] 0006 % meg_info : <required> <<struct>> MEGinfo which will be updated 0007 % n_ch : <required> number of refmg channels 0008 % [output] 0009 % meg_info : <<struct>> updated MEGinfo 0010 % [note] 0011 % initial value is eye(n_ch), n_ch by n_ch identity matrix 0012 % 1 0 0 0 0013 % 0 1 0 0 0014 % 0 0 1 0 0015 % 0 0 0 1 0016 % @see vb_meginfo_set_sensor_weight_refmg.m 0017 % [history] 0018 % 2011-07-20 (Sako) initial version 0019 0020 % --- CHECK ARGUMENTS --- % 0021 if ~exist('meg_info', 'var'), meg_info = []; end 0022 if ~exist('n_ch', 'var'), n_ch = []; end 0023 [meg_info, n_ch] = inner_check_arguments(meg_info, n_ch); 0024 0025 % --- MAIN PROCEDURE --------------------------------------------------------- % 0026 % 0027 meg_info = vb_meginfo_set_sensor_weight_refmg(meg_info, eye(n_ch) ); 0028 return; 0029 % 0030 % --- END OF MAIN PROCEDURE -------------------------------------------------- % 0031 0032 0033 % --- INNER FUNCTIONS -------------------------------------------------------- % 0034 % 0035 % --- inner_check_arguments() 0036 % 0037 function [meg_info, n_ch] = inner_check_arguments(meg_info, n_ch) 0038 func_ = mfilename; 0039 if isempty(meg_info) 0040 error('(%s) meg_info is a required parameter', func_); 0041 end 0042 0043 if isempty(n_ch) 0044 error('(%s) n_ch is a required parameter', func_); 0045 end 0046 return; 0047 % 0048 % --- end of inner_check_arguments() 0049 0050 % --- END OF FILE --- %