function humps_rk1 ( n )

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

  f = @ humps_deriv;
  tspan = [ 0.0, 2.0 ];
  y0 = humps_exact ( tspan(1) );

  [ t, y ] = rk1 ( 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 rk1(): plot' );
  legend ( 'rk1', 'Exact' );
  filename = 'humps_rk1.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end
