www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgconconstraint/islinear.m
function out=islinear(obj) %ISLINEAR Indicate whether constraint is linear % % ISLINEAR(OBJ) returns true if the constraint is a linear constraint. % Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc. if ~isempty(obj.ConObject) out = islinear(obj.ConObject); if out % Check that all inputs are actually inports. If not then the % inputs are non-linear and therefore this constraint is also % non-linear. pInp = getinputs(obj); isinp = parrayeval(pInp, @isinport, [], mbclogical); out = all(isinp); end else out = false; end