function humps_euler ( n )

%*****************************************************************************80
%
%% humps_euler solves the humps ODE using the euler code.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    07 September 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
  if ( nargin < 1 )
    n = 40;
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, 'humps_euler:\n' );
  fprintf ( 1, '  Approximate solution of humps ODE using euler().\n' );

  dydt = @ humps_deriv;
  tstart = 0.0;
  tstop = 2.0;
  tspan = [ tstart, tstop ];
  y0 = 5.1765;

  [ t, y ] = euler ( dydt, tspan, y0, n );

  plot ( t, y, 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<-- t -->' );
  ylabel ( '<-- y(t) -->' );
  s = sprintf ( 'euler humps solution using %d steps', n );
  title ( s );

  filename = sprintf ( 'humps_euler_%d.png', n );
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s".\n', filename );

  return
end
