www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgexpr/funcchar.m
function str = funcchar(obj) %FUNCCHAR Create function-style string describing the object % % STR = FUNCCHAR(OBJ) generates a string of the form 'NAME(INPUT_LIST)', % for example 'TORQUE(afr, spk, load, n)'. % Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc. pInp = getinports(obj); inpnames = pveceval(pInp, @getname); nm = getname(obj); if ~isempty(inpnames) inpstr = sprintf('%s, ', inpnames{:}); inpstr = inpstr(1:end-2); str = sprintf('%s(%s)', nm, inpstr); else str = nm; end