function logistic_euler ( n )

%*****************************************************************************80
%
%% logistic_euler() solves logistic_ode() using euler().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 August 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'logistic_euler():\n' );
  fprintf ( 1, '  Solve logistic_ode() using euler().\n' );

  [ r, k, t0, y0, tstop ] = logistic_parameters ( );

  tspan = [ t0, tstop ];
  f = @ logistic_deriv;

  [ t, y ] = euler ( f, tspan, y0, n );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of fixed steps = %d\n', n );

  y2 = logistic_exact ( t );

  clf ( );
  hold ( 'on' );
  plot ( t, y, 'ro-', 'linewidth', 3 );
  plot ( t, y2, 'bo-', 'linewidth', 3 );
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( '<-- t -->' );
  ylabel ( '<-- y(t) -->' );
  legend ( 'Computed', 'Exact' );
  title ( 'logistic\_ode(): euler()' );
  filename = 'logistic_euler.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end
