www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@mbcinputfactor/str_code.m
function Expression=str_code(cif,TeX) %STR_CODE cell string for displaying information about coding % % Expression=str_code(Model,TeX) % TeX=1 adds TeX formatting % Outputs a cell array of formatted expressions of coding information % Copyright 2007-2009 The MathWorks, Inc. if nargin<2 || isempty(TeX) TeX=false; end Expression=cell(1,length(cif)); for i=length(cif):-1:1 % Uses Symbolic Toolbox s= cif(i).Symbol; if TeX s= detex(s); end Expr = sprintf('%s: [%.4g,%.4g] ',s,cif(i).Range); g = cif(i).NonlinearTransform; if ~isempty(g) gs= texlabel(cif(i).Transform,s); Expr = [Expr gs ':']; end Tgt = cif(i).Target; if all(isfinite(Tgt)) Expr= [Expr, sprintf('\\rightarrow [%.4g,%.4g]',Tgt)]; end Expression{i}=Expr; end