www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgfeaturenode/private/pCreateStrategyDiagram.m

    function pCreateStrategyDiagram(pF, StrategyType, sys, pred)
%PCREATESTRATEGYDIAGRAM Create strategy diagram.
%
%   PCREATESTRATEGYDIAGRAM(PF, STRATEGYTYPE, SYS, PRED) creates the
%   strategy diagram for the feature.

%   Copyright 2006-2007 The MathWorks, Inc.


try
    W = cgexpr2sl(pF,StrategyType,sys,pred);
catch
    % Error occurred during export.  Try to clean up and continue
    h = errordlg(['An error occurred during strategy creation.  ' ...
        'The strategy diagram may not be complete.'], 'CAGE Error', 'modal');
    waitfor(h);
    W = {};
end

if ~isempty(W)
    % Display warnings
    for n = 1:length(W)
        W{n} = ['\bullet ' detex(W{n})];
    end
    W = [{'The following warning messages were generated during strategy creation:', ''}, W];
    h = warndlg(W, 'CAGE Strategy Warnings', ...
        struct('WindowStyle', 'modal', 'Interpreter', 'tex'));
    waitfor(h);
end