www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@modeldev/print.m

    function OK = print(md,h)
%PRINT Generic print function for modeldev objects
%
%  OK = PRINT(MDEV, MBH)

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


OK=1;
fH= h.Figure;
View = h.GetViewData;

% Create a modelpane and use its printing mechanism to generate the model description axes
tempFig = xregfigure('Visible', 'off');
mview = xregMdlGui.modelpane('Parent', tempFig, ...
    'Model', model(md), ...
    'ModelName', fullname(md));
tH = mview.printcopy(tempFig);
set(tH, 'Position', [1 1 mview.printSize]);

switch md.ViewIndex
    case 'global'
        % Get handle to currently visible diagnostic plot
        aH = View.printAxes;
        printlayout1(aH,tH,fullname(md));

    case 'twostage'
        plyt = View.printLayout;
        printlayout1(plyt,tH,fullname(md));

end

delete(tempFig);