function humps_rk4 ( n )

%*****************************************************************************80
%
%% humps_rk4() solves humps_ode() using rk4().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 April 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'humps_rk4():\n' );
  fprintf ( 1, '  Solve humps_ode() using rk4().\n' );

  [ t0, y0, tstop ] = humps_parameters ( );

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

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

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of fixed steps = %d\n', 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 ( 'humps\_ode(): rk4()' );

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

  return
end
