www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@tradeoffExecutor/resetValue.m
function resetValue(obj, pInput) %RESETVALUE Re-set input values to their saved settings % % RESETVALUE(OBJ, PINPUT) alters the candidate value for PINPUT to be its % last saved tradeoff value. PINPUT may be either a pointer to an input % variable or an index into the cached list of inputs in this object. % % RESETVALUE(OBJ) resets all off the inputs to their last saveed values. % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. obj.hMessageService.setInputsToCurrentPoint; if nargin>1 if ~isnumeric(pInput) idx = find(pInput == obj.pInputs); else idx = pInput; pInput = obj.pInputs(idx); end obj.Values(idx) = pInput.getvalue; else vals = pveceval(obj.pInputs, @getvalue); obj.Values = [vals{:}]; end obj.hMessageService.notifyCandidateValueChange;