www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgconstant/getrange.m
function rng = getrange(obj, varargin) %GETRANGE Return range of constant % % RNG = GETRANGE(OBJ) returns a two-element vector containing the minimum % and maximum output values of the variable. For a constant, this range % is a small region centred on the constant value. % % RNG = GETRANGE(OBJ, QUANTITY) returns the output range for the specified % quantity. QUANTITY must be a function handle to an expression method of % the form Y = FUNC(OBJ). % Copyright 2005 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin==1 rng = mbcmakelimits(getvalue(obj), 'loose'); else obj = setvalue(obj, getvalue(obj)); rng = mbcmakelimits(evaluate(obj, varargin{:}), 'loose'); end