Demonstrates the TimeGUI plugin in a loop.

------------------------------------------------------------------------
See also TimeGUI
------------------------------------------------------------------------

Contents

%-------------------------------------------------------------------------------
%   Copyright (c) 2007 Princeton Satellite Systems, Inc. All rights reserved.
%-------------------------------------------------------------------------------

Global for the interface

%-------------------------
global simulationAction
simulationAction = ' ';

Simulation data

%----------------
nSim = 3000;
dTSim = 0.1;

Initialize the time display

%----------------------------
[ ratioRealTime, tToGoMem ] = TimeGUI( nSim );

Run the simulation

------------------

for k = 1:nSim

  % Display the status message
  %---------------------------
  [ ratioRealTime, tToGoMem ] = TimeGUI( nSim, k, tToGoMem, ratioRealTime, dTSim );

  % Perform an action - make a symmetric matrix
  %--------------------------------------------
  a = rand(3,3);
  b = a'*a;
  c = diag(b);

  % Time control
  %-------------
  switch simulationAction
    case 'pause'
      pause
      simulationAction = ' ';
    case 'stop'
      return;
    case 'plot'
      break;
  end

end

pause(2)
TimeGUI( 'close' );

%--------------------------------------
% PSS internal file version information
%--------------------------------------
% $Date$
% $Id: 1b121ec96c33bd13e0eec75600b7b57ebfd47d24 $