www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@contable2/tostring.m

    function ch=tostring(obj)
%TOSTRING  Create string representation of constraint
%
%  STR=TOSTRING(CON)
%
%  See also CONTABLE2, CONBASE/TOSTRING.

%  Copyright 2000-2013 The MathWorks, Inc. and Ford Global Technologies, Inc.

cif = getActiveFactors( obj );
fact = getSymbols( cif );

if obj.le
   ch = sprintf('%s(%s,%s) <= %smax', fact{[3, 2, 1, 3]} );
else
   ch = sprintf('%s(%s,%s) >= %smin', fact{[3, 2, 1, 3]} );
end