function area_under_curve_test ( )

%*****************************************************************************80
%
%% area_under_curve_test() tests area_under_curve().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 November 2018
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../area_under_curve' )

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'area_under_curve_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test area_under_curve().\n' );

  area_under_curve ( -1.5, +1.5, @f1, 'Y=3/4(1-x^2)', 'f1.png' );

  area_under_curve ( 0.0, 1.0, @f2, 'Y=2*x', 'f2.png' );

  area_under_curve ( 0.0, 3.0, @f3, 'Y=e^{-x}', 'f3.png' );

  area_under_curve ( 0.0, 7.0, @f4, 'Y=Gaussian(x,\mu=5,\sigma=1)', 'f4.png' );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'area_under_curve_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../area_under_curve' )

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

