function rbf_interp_1d_test ( )

%*****************************************************************************80
%
%% rbf_interp_1d_test() tests rbf_interp_1d().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 March 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../r8lib' )
  addpath ( '../rbf_interp_1d' );
  addpath ( '../test_interp' )

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'rbf_interp_1d_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test rbf_interp_1d().\n' );
  fprintf ( 1, '  The R8LIB library is needed.\n' );
  fprintf ( 1, '  The test needs TEST_INTERP.\n' );

  phi1_test ( );
  phi2_test ( );
  phi3_test ( );
  phi4_test ( );

  rbf_weight_test ( );

  prob_num = p00_prob_num ( );

  for prob = 1 : prob_num
%
%  Determine an appropriate value of R0, the spacing parameter.
%
    nd = p00_data_num ( prob );
    xy = p00_data ( prob, 2, nd );
    xd = reshape ( xy(1,1:nd), nd, 1 );
    xmax = max ( xd );
    xmin = min ( xd );
    r0 = ( xmax - xmin ) / ( nd - 1 );

    rbf_interp_1d_test01 ( prob, @phi1, 'phi1', r0 );
    rbf_interp_1d_test01 ( prob, @phi2, 'phi2', r0 );
    rbf_interp_1d_test01 ( prob, @phi3, 'phi3', r0 );
    rbf_interp_1d_test01 ( prob, @phi4, 'phi4', r0 );

  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'rbf_interp_1d_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../r8lib' )
  rmpath ( '../rbf_interp_1d' );
  rmpath ( '../test_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

