www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgexprconstraint/i_eval.m

    function output = i_eval(obj)
%I_EVAL Evaluate expression
%
%  OUT = I_EVAL(OBJ) calculates and returns the value of the expression.
%  This normally depends on the values of the expression inputs.  The
%  default implementation evauluates the inputs and passes the values on to
%  evalAtInputs.

%  Copyright 2005 The MathWorks, Inc. and Ford Global Technologies, Inc.


% Expression constraints do not always use i_eval on their inputs
[lhs, rhs] = pevalinputs(obj);
if obj.ExprEvalFunc==1
    output = lhs;
else
    output = obj.DistOperator(obj, lhs, rhs);
end