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

    function out = cevalAtInputs(obj, inputs)
%CEVALATINPUTS Evaluate expression constraints at given input values.
%
%  OUT = CEVALATINPUTS(OBJ, INPUTS) returns the value of the constraints
%  for the expression at the input values in INPUTS.  INPUTS should be a
%  cell array with a cell for each input to the expression that contains a
%  vector of input values. Each input should be a vector.  They should all
%  be either the same length or scalars.

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


% Standard expression return a boundary based on the constraint values of
% their inputs.  

if isempty(inputs)
    out = -1;
else
    out = inputs{1};
    for n = 2:length(inputs)
        out = max(out, inputs{n});
    end
end