function yi = vandermonde_value_1d ( nd, cd, ni, xi )

%*****************************************************************************80
%
%% VANDERMONDE_VALUE_1D evaluates a Vandermonde interpolant.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 December 2013
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer ND, the number of data values.
%
%    Input, real CD(ND,1), the polynomial coefficients.  
%    CD(I) is the coefficient of X^(I-1).
%
%    Input, integer NI, the number of interpolation points.
%
%    Input, real XI(NI,1), the interpolation points.
%
%    Output, real YI(NI,1), the interpolation values.
%
  xi = xi(:);
  cd = cd(:);

  yi = zeros ( ni, 1 );

  yi(1:ni) = cd(nd);
  for i = nd - 1 : -1 : 1
    yi(1:ni) = yi(1:ni) .* xi(1:ni) + cd(i);
  end

  return
end
