function sir_test ( )

%*****************************************************************************80
%
%% sir_test tests sir.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    16 March 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../sir' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'sir_test:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test SIR,\n' );
  fprintf ( 1, '  which simulates disease epidemics with an SIR model.\n' );

  m = 5000;
  beta = 0.0075;
  gamma = 0.005;

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of steps = %d\n', m );
  fprintf ( 1, '  Infection parameter beta = %g\n', beta );
  fprintf ( 1, '  Recovery parameter gamma = %g\n', gamma );

  [ S, I, R ] = sir ( m, beta, gamma );

  plot ( 1:m, S, 1:m, I, 1:m, R, 'LineWidth', 3 );
  grid on
  xlabel ( '<-- Time -->' );
  ylabel ( '<-- Cases -->' );
  title_string = sprintf ( '\\beta = %g, \\gamma = %g\n', beta, gamma );
  title ( title_string, 'Fontsize', 24 );
  filename = 'sir.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  pause ( 5 );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'sir_test:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../sir' );

  return
end
