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

    function ch=tostring(c)
%TOSTRING  Create string representation of constraint
%  STR = TOSTRING(CON,FACTORS)
%

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


fact = getSymbols( getActiveFactors( c ) );

ch = sprintf( 'Star(%s%+.2g', fact{1}, -c.Center(1) );
for i = 2:length( fact ),
    ch = strcat( ch, sprintf( ',%s%+.2g', fact{i}, -c.Center(i) ) );
end
ch = strcat( ch, ') <= 0' );