function predator_euler ( n )

%*****************************************************************************80
%
%% predator_euler calls euler() with specific values of n, a, b, and y0.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    29 October 2019
%
%  Author:
%
%    John Burkardt
%
  if ( nargin < 1 )
    n = input ( 'Enter the number of steps to take, n: ' )
  end

  a = 0.0;
  b = 5.0;
  r = 5000;
  f = 100;
  y0 = [ r, f ];
  
  [ t, y ] = euler ( @(t,y)predator_prime(t,y), n, a, b, y0 );

  figure ( 1 )
  plot ( t, y, 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<-- T -->' );
  ylabel ( '<-- Y(T) -->' );
  dt = ( b - a ) / n;
  label = sprintf ( 'Predator ODE with dt = %g\n', dt );
  title ( label );
  filename = 'predator_plot.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  figure ( 2 )
  clf ( );
  hold ( 'on' );
  plot ( y(:,1), y(:,2), 'm-', 'linewidth', 3 );
  plot ( y(1,1), y(1,2), 'g.', 'markersize', 40 );
  plot ( y(end,1), y(end,2), 'r.', 'markersize', 30 );
  hold ( 'off' );
  grid ( 'on' );
  axis ( 'equal' );
  xlabel ( '<-- Prey(T) -->' );
  ylabel ( '<-- Predators(T) -->' );
  dt = ( b - a ) / n;
  label = sprintf ( 'Predator ODE with dt = %g\n', dt );
  title ( label );
  filename = 'predator_phase.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

  
