www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@mbcinputfactor/toString.m

    function str = toString(obj, tex)
%TOSTRING Convert constraint input factor object into a cell-string
%
%  STR = TOSTRING(obj)
%  STR = CHAR(obj, TEX)
%
%  See also MBCINPUTFACTOR.

%  Copyright 2007 The MathWorks, Inc.

NF = length( obj );

if nargin < 2,
    tex = false;
end

str = cell( NF, 1 );
for i = 1:NF,
    Rng = obj(i).Range;
    str{i} = [label(obj(i)), sprintf(' [%g, %g]',Rng(1),Rng(2))];
end

if tex,
    str = detex( str );
end


%------------------------------------------------------------------------------|
% EOF
%------------------------------------------------------------------------------|