function predator_rk1 ( )

%*****************************************************************************80
%
%% predator_rk1() calls rk1() with specific values of n, a, b, and y0.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 March 2020
%
%  Author:
%
%    John Burkardt
%
  f = @ predator_deriv;
  tspan = [ 0.0, 5.0 ];
  y0 = [ 5000, 100 ];
  n = 1000;
  
  [ t, y ] = rk1 ( f, tspan, y0, n );

  dt = ( tspan(2) - tspan(1) ) / n;

  figure ( 1 )
  clf ( );
  hold ( 'on' );
    plot ( t, y(:,1), 'g', 'linewidth', 3 );
    plot ( t, y(:,2), 'r', 'linewidth', 3 );
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( '<-- T -->' );
  ylabel ( '<-- Y(T) -->' );
  label = sprintf ( 'Predator/Prey RK1 solution with dt = %g\n', dt );
  title ( label );
  legend ( 'Prey', 'Predator' );
  filename = 'predator_rk1_time.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  figure ( 2 )
  clf ( );
  plot ( y(:,1), y(:,2), 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<-- Prey(T) -->' );
  ylabel ( '<-- Predators(T) -->' );
  label = sprintf ( 'Predator/Prey RK1 solution phase with dt = %g\n', dt );
  title ( label );
  filename = 'predator_rk1_phase.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

  
