function trig_interp_test ( )

%*****************************************************************************80
%
%% trig_interp_test() tests trig_interp().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 August 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../trig_interp' );

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

  label = 'f1';
  xmin = 0.0;
  xmax = 1.0;
  trig_interp_cardinal_test ( label, @f1, xmin, xmax );

  label = 'f2';
  xmin = 0.0;
  xmax = 1.0;
  trig_interp_cardinal_test ( label, @f2, xmin, xmax );

  label = 'f3';
  xmin = 0.0;
  xmax = 1.0;
  trig_interp_cardinal_test ( label, @f3, xmin, xmax );

  label = 'f4';
  xmin = 0.0;
  xmax = 1.0;
  trig_interp_cardinal_test ( label, @f4, xmin, xmax );

  label = 'f5';
  xmin = 0.0;
  xmax = 1.0;
  trig_interp_cardinal_test ( label, @f5, xmin, xmax );

  nd = 4;
  trig_cardinal_test ( nd );

  nd = 9;
  trig_cardinal_test ( nd );
%
%  Lagrange formulation.
%
  label = 'f1';
  xmin = 0.0;
  xmax = 1.0;
  trig_interp_lagrange_test ( label, @f1, xmin, xmax );

  label = 'f2';
  xmin = 0.0;
  xmax = 1.0;
  trig_interp_lagrange_test ( label, @f2, xmin, xmax );

  label = 'f3';
  xmin = 0.0;
  xmax = 1.0;
  trig_interp_lagrange_test ( label, @f3, xmin, xmax );

  label = 'f4';
  xmin = 0.0;
  xmax = 1.0;
  trig_interp_lagrange_test ( label, @f4, xmin, xmax );

  label = 'f5';
  xmin = 0.0;
  xmax = 1.0;
  trig_interp_lagrange_test ( label, @f5, xmin, xmax );
%
%  Here's what happens if ND is not odd!.
%
  nd = 4;
  trig_lagrange_test ( nd );

  nd = 9;
  trig_lagrange_test ( nd );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'trig_interp_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../trig_interp' );

  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

