www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@tradeoffExecutor/setValueAtMaxOf.m
function setValueAtMaxOf(obj, pInput, pExpr) %SETVALUEATMAXOF Set an input's value to match the maximum of an expression % % SETVALUEATMAXOF(OBJ, PINPUT, PEXPR) finds the maximum of the input % PINPUT of the expression PEXPR and saves this as the candidate value for % PINPUT. Other tradeoff inputs are held at their candidate values. % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. if isnumeric(pInput) idx = pInput; pInput = obj.pInputs(idx); end % Snap all inputs to their current point values obj.setPointValues; Value = pExpr.findextremum(pInput, 'maximum'); obj.setValue(pInput, Value);