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

    function cvals = evalAtInputs(obj, inputcell)
%EVALATINPUTS Evaluate expression at given input values.
%
%  OUT = EVALATINPUTS(OBJ, INPUTS) returns the value of the expression at
%  the inputs values in INPUTS.

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


if ~isempty(obj.ConObject) && length(inputcell)==length(getinputs(obj))
    inputs = zeros(max(cellfun('length',inputcell)),length(inputcell));
    for n = 1:length(inputcell)
        inputs(:,n) = inputcell{n}(:);
    end
    cvals = constraintDistance(obj.ConObject, inputs);
else
    cvals = 0;
end