www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgrangeconstraint/isLinear.m

    function out = isLinear(obj)
%ISLINEAR Indicate whether constraint is linear
%
%   ISLINEAR(OBJ) returns true if the constraint is a linear constraint.

%   Copyright 2006 The MathWorks, Inc.

if isStaticMode(obj)
    out = getStaticData(obj, 'IsLinear');
else
    % Constraint is linear if both bound constraints are linear
    out = islinear(obj.LowerBound.info) && islinear(obj.UpperBound.info);
end