www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgconconstraint/lhsevalAtInputs.m
function out = lhsevalAtInputs(obj, inputcell) %LHSEVALATINPUTS Evaluate constraint side at given input values. % % OUT = LHSEVALATINPUTS(OBJ, INPUTS) returns the value of the left-hand % side of the constraint 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 The MathWorks, Inc. and Ford Global Technologies, Inc. if ~isempty(obj.ConObject) && length(inputcell)==length(getinputs(obj)) % Get left hand side of conbase object inputs = zeros(max(cellfun('length',inputcell)),length(inputcell)); for n = 1:length(inputcell) inputs(:,n) = inputcell{n}(:); end out = getRelationValues(obj.ConObject, inputs, 'left'); else out = 0; end