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

    function [mode, code] = getUpperValueMode(obj)
%GETUPPERVALUEMODE Return current evaluation mode of the upper bound
%
%   MODE = GETUPPERVALUEMODE(OBJ) returns a strings that indicates what is
%   currently being used as the upper bound of the constraint. If MODE =
%   'value' then a constant is being used for the upper bound and if MODE =
%   'input' then the expression is being evaluated.
%
%   [MODE, CODE] = GETUPPERVALUEMODE(OBJ) also returns an integer which
%   indicating the current mode for the upper bound: 0 for 'value',
%   and 1 for 'input'.
%
%   See also CGRANGECONSTRAINT/SETUPPERVALUEMODE

%   Copyright 2006 The MathWorks, Inc.

% Get mode and code for both the upper bound
[mode, code] = getvaluemode(obj.UpperBound.info);
[mode, code] = pExprConToInternal(obj, mode, code, 'upper');