function exp_ode45 ( tstop )

%*****************************************************************************80
%
%% exp_ode45 uses ode45() on the EXP ODE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 November 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real TSTOP: the final time.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'exp_ode45\n' );
  fprintf ( 1, '  Solve the EXP ODE using ode45().\n' );

  [ alpha, t0, y0 ] = exp_parameters ( );

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

  [ t1, y1 ] = ode45 ( f, tspan, y0 );
  n = length ( t1 );
  fprintf ( 1, '  Number of steps taken was %d\n', n );

  t2 = linspace ( t0, tstop, 101 );
  y2 = exp_solution ( t2 );

  clf ( );
  plot ( t1, y1, 'r-o', t2, y2, 'b-', 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<-- t -->' );
  ylabel ( '<-- y(t) -->' );
  title ( ' EXP ODE, ode45' );
  legend ( 'Computed', 'Exact' );
  filename = 'exp_ode45.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  y2 = exp_solution ( t1 );
  e = rms ( y1 - y2 );
  fprintf ( 1, '  RMS error norm = %g\n', e );

  return
end

