Home > vbmeg > functions > device > vb_info_add_preprocess_parm.m

vb_info_add_preprocess_parm

PURPOSE ^

add preprocess_parm to MEGinfo or EEGinfo

SYNOPSIS ^

function new_info = vb_info_add_preprocess_parm(info, parm)

DESCRIPTION ^

 add preprocess_parm to MEGinfo or EEGinfo
 [usage]
   new_info = vb_info_add_preprocess_parm(info, parm)
 [input]
       info : <required> <<struct>> MEGinfo or EEGinfo
       parm : <required> <<struct>> added preprocess_parm
 [output]
   new_info : updated MEGinfo or EEGinfo
 [note]
   
 [history]
   2008-04-11 (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 new_info = vb_info_add_preprocess_parm(info, parm)
0002 % add preprocess_parm to MEGinfo or EEGinfo
0003 % [usage]
0004 %   new_info = vb_info_add_preprocess_parm(info, parm)
0005 % [input]
0006 %       info : <required> <<struct>> MEGinfo or EEGinfo
0007 %       parm : <required> <<struct>> added preprocess_parm
0008 % [output]
0009 %   new_info : updated MEGinfo or EEGinfo
0010 % [note]
0011 %
0012 % [history]
0013 %   2008-04-11 (Sako) initial version
0014 %
0015 % Copyright (C) 2011, ATR All Rights Reserved.
0016 % License : New BSD License(see VBMEG_LICENSE.txt)
0017 
0018 % --- CHECK ARGUMENT --- %
0019 if ~exist('info', 'var'), info = []; end
0020 if ~exist('parm', 'var'), parm = []; end
0021 [info, parm] = inner_check_argument(info, parm);
0022 
0023 % --- MAIN PROCEDURE --------------------------------------------------------- %
0024 %
0025 if ~isfield(info, 'History')
0026   len_history = 0;
0027 else
0028   len_history = length(info.History);
0029 end
0030 
0031 new_info = info;
0032 new_info.History{len_history + 1} = parm;
0033 return;
0034 %
0035 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0036 
0037 % --- INNER FUNCTIONS -------------------------------------------------------- %
0038 %
0039 % --- inner_check_argument()
0040 %
0041 function [info, parm] = inner_check_argument(info, parm)
0042 func_ = mfilename;
0043 if isempty(info)
0044   error('(%s)info is required', func_);
0045 end
0046 
0047 if isempty(parm)
0048   error('(%s)parm is required', func_);
0049 end
0050 return;
0051 %
0052 % --- end of inner_check_argument()
0053 
0054 %%% END OF FILE %%%

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