Set parameter to the specified index. [USAGE] [parm, parm_type] = vb_batch_parm_set_set_parm(<obj>, <ix>); [IN] obj : vb_batch_parm_set object ix : index of the parameter set. parm : to be added parameter to the set parm_type : parameter type such as 'brain_parm', 'head_parm',.. [STRING] [OUT] obj : vb_batch_parm_set object errmsg : if error occured, the reason will be containd. Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [obj, errmsg] = vb_batch_parm_set_set_parm(obj, ix, parm, parm_type) 0002 % Set parameter to the specified index. 0003 % 0004 % [USAGE] 0005 % [parm, parm_type] = vb_batch_parm_set_set_parm(<obj>, <ix>); 0006 % [IN] 0007 % obj : vb_batch_parm_set object 0008 % ix : index of the parameter set. 0009 % parm : to be added parameter to the set 0010 % parm_type : parameter type such as 'brain_parm', 'head_parm',.. [STRING] 0011 % [OUT] 0012 % obj : vb_batch_parm_set object 0013 % errmsg : if error occured, the reason will be containd. 0014 % 0015 % Copyright (C) 2011, ATR All Rights Reserved. 0016 % License : New BSD License(see VBMEG_LICENSE.txt) 0017 0018 % 0019 % --- Previous check 0020 % 0021 if ~exist('obj', 'var') 0022 error('obj is a required parameter.'); 0023 end 0024 if ~exist('ix', 'var') 0025 error('ix is a required parameter.'); 0026 end 0027 0028 % 0029 % --- Main Procedure 0030 % 0031 errmsg = []; 0032 0033 try 0034 obj.list{ix, 1} = parm; 0035 obj.list{ix, 2} = parm_type; 0036 catch 0037 errmsg = 'specified index is invalid.'; 0038 warning(errmsg); 0039 end 0040 0041 % 0042 % --- After check 0043 % 0044 if nargout < 1 0045 error('function caller should receive vb_batch_parm_set object'); 0046 end