www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgexprconstraint/getvaluemode.m
function [mode, code] = getvaluemode(obj) %GETVALUEMODE Return string describing the current mode of the right-hand side % % MODE = GETVALUEMODE(OBJ) returns a string that indicates what is % currently being used as the right-hand side of the constraint. If MODE % = 'value' then a constant is being used and if MODE = 'input' then the % second input to the expression is beine evaluated. % % [MODE, CODE] = GETVALUEMODE(OBJ) also returns a numeric code that % indicates the current mode: 0 for 'value', and 1 for 'input'. % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. if obj.CompValueType==0 mode = 'value'; else mode = 'input'; end if nargout>1 code = obj.CompValueType; end