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

    function bounds = getBounds(obj, dim)
%GETBOUNDS Return the bounds on the variable
%
%   BOUNDS = GETBOUNDS(OBJ) returns the bounds on the variable in
%   all axes directions as a NAXES-by-3 matrix. See the help for SETBOUNDS
%   for a definition of the structure of BOUNDS.
%
%   BOUNDS = GETBOUNDS(OBJ, DIM) returns the gradient bounds on the
%   variable for the DIM-th axis.
%
%   See also CGTABGRADCONSTRAINT/SETBOUNDS

%   Copyright 2006 The MathWorks, Inc.

if nargin < 2
    bounds = obj.Bounds;
else
    bounds = obj.Bounds(dim, :);
end