www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgexprgui/@EquationView/pDrawInputs.m

    function pDrawInputs(obj)
%PDRAWINPUTS Redraw the inputs string
%
%  PDRAWINPUTS(OBJ) recreates and redraws the inputs of the current
%  expression.

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


expr = obj.Expression;

if ~isobject(expr) && isempty(expr)
    inputstr = '(none)';
else
    if isinport(expr)
        inputstr = getname(expr);
    else
        pInp = getinports(expr);
        strInp = pveceval(pInp, @getname);
        inputstr = sprintf('%s, ', strInp{:});
        inputstr = ['Inputs: ', inputstr(1:end-2)];
    end
end
set(obj.hInputs,'String',inputstr);