function sensitive_ode45 ( )

%*****************************************************************************80
%
%% sensitive_ode45() solves sensitive_ode() using ode45().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 December 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'sensitive_ode45():\n' );
  fprintf ( 1, '  Use ode45() to solve sensitive_ode()\n' );
  fprintf ( 1, '\n' );

  ep = 1.0E-06;
  fprintf ( 1, '  Initial condition perturbation ep = %g\n', ep )

  hold ( 'on' );

  for k = 1 : 3
%
%  Get the parameters.
%
    [ t0, y0, tstop ] = sensitive_parameters ( );
%
%  Set y0(1).
%
    if ( k == 1 )
      y0(1) = 1.0 + ep;
    elseif ( k == 2 )
      y0(1) = 1.0;
    else
      y0(1) = 1.0 - ep;
    end

    [ t0, y0, tstop ] = sensitive_parameters ( t0, y0, tstop );
%
%  Call ODE45 to estimate the solution.
%
    tspan = [ t0, tstop ];

    [ t, y ] = ode45 ( @sensitive_deriv, tspan, y0 );

    n = size ( t, 1 );
    fprintf ( 1, '\n' );
    fprintf ( 1, '  For k = %d, number of variable-size steps = %d\n', k, n );
%
%  Plot the solution curve.
%
    plot ( t, y(:,1), 'Linewidth', 1 );

  end

  title ( 'sensitive_ode(): ode45' );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- Y(T) --->' );
  legend ( 'Y''(0)=1+ep', 'Y''(0)=1', 'Y''(0)=1-ep' );

  hold ( 'off' )
%
%  Save a copy in a file.
%
  filename = 'sensitive_ode45.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

