Edit parameter [USAGE] [obj] = vb_batch_mgr_edit_parm(<obj>, <ix_main>, <ix_sub>); [IN] obj : vb_batch_mgr object ix_main : parameter set specifier = 0 : template parameter set >=1 : batch parameter set ix_sub : index in the parameter set. [OUT] obj : vb_batch_mgr 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_mgr_edit_parm(obj, ix_main, ix_sub) 0002 % Edit parameter 0003 % 0004 % [USAGE] 0005 % [obj] = vb_batch_mgr_edit_parm(<obj>, <ix_main>, <ix_sub>); 0006 % [IN] 0007 % obj : vb_batch_mgr object 0008 % ix_main : parameter set specifier 0009 % = 0 : template parameter set 0010 % >=1 : batch parameter set 0011 % ix_sub : index in the parameter set. 0012 % [OUT] 0013 % obj : vb_batch_mgr object 0014 % errmsg : if error occured, the reason will be containd. 0015 % 0016 % Copyright (C) 2011, ATR All Rights Reserved. 0017 % License : New BSD License(see VBMEG_LICENSE.txt) 0018 0019 % 0020 % --- Previous check 0021 % 0022 if ~exist('obj', 'var') 0023 error('obj is a required parameter.'); 0024 end 0025 if ~exist('ix_main', 'var') 0026 error('ix_main is a required parameter.'); 0027 end 0028 if ~exist('ix_sub', 'var') 0029 error('ix_sub is a required parameter.'); 0030 end 0031 % 0032 % --- Main Procedure 0033 % 0034 errmsg = ''; 0035 0036 if isempty(ix_main) || isempty(ix_sub) 0037 return; 0038 end 0039 0040 % get specified parameter set 0041 parm_set = vb_batch_mgr_get_parm_set(obj, ix_main); 0042 0043 % get parameter 0044 [parm, parm_type] = vb_batch_parm_set_get_parm(parm_set, ix_sub); 0045 0046 % edit parameter 0047 updated_parm = vb_parm_editor_gui(parm, parm_type); 0048 0049 % set updated parameter set to the vb_batch_mgr object 0050 if ~isempty(updated_parm) 0051 [obj, errmsg] = ... 0052 vb_batch_mgr_set_parm(obj, ix_main, ix_sub, updated_parm, parm_type); 0053 end 0054 0055 % 0056 % --- After check 0057 % 0058 if nargout < 1 0059 error('function caller should receive this object.'); 0060 end