function humps_b1g3 ( tspan, y0, n )

%*****************************************************************************80
%
%% humps_b1g3() solves the humps ODE using b1g3().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 May 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real TSPAN(2): the first and last times.
%
%    real Y0: the initial condition.
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'humps_b1g3:\n' );
  fprintf ( 1, '  Solve the humps ODE using b1g3().\n' );

  f = @ humps_deriv;

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

  t2 = linspace ( tspan(1), tspan(2), 101 );
  y2 = humps_exact ( t2 );

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

  return
end
