www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregusermod/str_func.m
function ch= str_func(U,TeX) %STR_FUNC one line summary (possibly TeX) of userdefined model % % ch= str_func(U,TeX) % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. ch= ''; try ch= feval(U.funcName,U,'str_func'); if ~isempty(ch) && ~ischar(ch) ch = ''; error(message('mbc:xregusermod:InvalidValue9', name( U ))) end catch ME if ~strcmp(ME.identifier,'MATLAB:UndefinedFunction') || isempty(strfind(ME.message,'i_str_func')) % It is permissible not to define str_func in the MATLAB file ReportError(U,ME) end end if isempty(ch) c= labels(U); s= get(U,'symbol'); syms= sprintf('%s,',s{:}); p = sprintf('%s,',c{:}); ch= sprintf('%s([%s] , \\beta=[%s] )', name(U),syms(1:end-1),p(1:end-1)); end