function humps_rk3 ( tspan, y0, n )

%*****************************************************************************80
%
%% humps_rk3() solves the humps ODE using rk3().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 May 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'humps_rk3():\n' );
  fprintf ( 1, '  Solve the humps ODE using rk3().\n' );

  f = @ humps_deriv;

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

  y2 = humps_exact ( t );

  clf ( );
  hold ( 'on' );
  plot ( t, y, 'r-', 'linewidth', 3 );
  plot ( t, y2, 'b-', 'linewidth', 3 );
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( '<-- t -->' );
  ylabel ( '<-- y(t) -->' );
  title ( 'humps rk3(): plot' );
  legend ( 'rk3', 'Exact' );
  filename = 'humps_rk3.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end
