% This is the master script for the f14 demo.
% The first action required is to determine what products the user has.
% The options are:
%
%    1. Both control toolbox and stateflow are detected, and the complete
%        design GUI is used.
%   
%    2. The user has stateflow and not control:
%	-- In this case the model does not have the control design in it
%    
%    3. The user has control and not stateflow:
%       -- In this case a model of the F14 without stateflow is used
%
%    4 The user only has Simulink (No control toobox or stateflow):
%       -- In this case only the F14 model is shown and not the GUI

%   $Revision: 1.1 $  $Date: 2000/06/15 23:01:45 $

if (exist('control','dir')==7 & exist('stateflow','dir')==7)
    modelName = 'f14_digital';
   
 elseif (exist('stateflow','dir')==7 & ~exist('control','dir')==7)
   disp('Stateflow has been detected.')
   disp('You do not have the Control System Toolbox so you can not')
   disp('exercise the control system design features in this demo.')
   modelName = 'f14_dig_sf';
    
 elseif (exist('control','dir')==7 & ~exist('stateflow','dir')==7) 
   disp('Control Toolbox has been detected')
   disp('You do not have Stateflow, so this example will not illustrate')
   disp('the anti wind-up feature discussed in this demo.')
   modelName = 'f14_dig_ctrl';

 else
   modelName = 'f14_dig_basic';
end

open_system(modelName)
playshow f14_show





