function humps_rk4 ( tspan, y0, n )

%*****************************************************************************80
%
%% humps_rk4 solves the humps ODE using the RK4 method.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 April 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real TSPAN(2): the initial and final times.
%
%    real Y0: the initial condition.
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'humps_rk4:\n' );

  f = @ humps_deriv;

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

  y2 = humps_exact ( t );

  clf ( );
  hold ( 'on' );
  plot ( t, y, 'ro-', 'linewidth', 3 );
  plot ( t, y2, 'b-', 'linewidth', 3 );
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( '<-- t -->' );
  ylabel ( '<-- y(t) -->' );
  legend ( 'Computed', 'Exact' );
  title ( 'rk4: Humps ODE' );

  print ( '-dpng', 'humps_rk4.png' );

  return
end
