function shepard_value_1d_test ( )

%*****************************************************************************80
%
%% SHEPARD_VALUE_1D_TEST tests SHEPARD_VALUE_1D.
%
%  Discussion:
%
%    f(x) = x^3 - 12 x^2 + 39 x - 28 = ( x - 1 ) * ( x - 4 ) * ( x - 7 )
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified: 
%
%    03 July 2015
%
%  Author:
%
%    John Burkardt
%
  nd = 4;
  ni = 21;

  xd = [ 0.0; 2.0; 5.0; 10.0 ];
  yd = [ -28.0, +10.0, -8.0, +162.0 ];
 
  fprintf ( '\n' );
  fprintf ( 'SHEPARD_VALUE_1D_TEST:\n' );
  fprintf ( '  SHEPARD_VALUE_1D evaluates a Shepard 1D interpolant.\n' );

  p = 2.0;
  fprintf ( '\n' );
  fprintf ( '  Using power P = %g\n', p );

  x_min = 0.0;
  x_max = 10.0;
  xi = linspace ( x_min, x_max, ni );

  yi = shepard_value_1d ( nd, xd, yd, p, ni, xi );

  r8vec2_print ( ni, xi, yi, '  Table of interpolant values:' );

  return
end
