function dot_l2_test ( )

%*****************************************************************************80
%
%  dot_l2_test() tests dot_l2().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 July 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../dot_l2' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'dot_l2_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test dot_l2()\n' );
%
%  Legendre P3 * P3.
%
  f_string = 'p3(x)';
  g_string = 'p3(x)';
  a = -1.0;
  b = +1.0;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  f(x) = "%s"\n', f_string );
  fprintf ( 1, '  g(x) = "%s"\n', g_string );
  fprintf ( 1, '  %g <= x <= %g\n', a, b );
  value = dot_l2 ( f_string, g_string, a, b );
  fprintf ( 1, '  <f(x),g(x)>_2 = %g\n', value );
%
%  Legendre P3 * P4.
%
  f_string = 'p3(x)';
  g_string = 'p4(x)';
  a = -1.0;
  b = +1.0;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  f(x) = "%s"\n', f_string );
  fprintf ( 1, '  g(x) = "%s"\n', g_string );
  fprintf ( 1, '  %g <= x <= %g\n', a, b );
  value = dot_l2 ( f_string, g_string, a, b );
  fprintf ( 1, '  <f(x),g(x)>_2 = %g\n', value );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'dot_l2_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  rmpath ( '../dot_l2' );

  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

