function c = divdiffc(x,y)
%  This function returns the coefficients for the
%  Newton's divided difference form of the
%  Lagrange polynomial
%  Input:  vectors x and y of data points
c=y;
m = max(size(x));
for k=1:m-1
  for j=m:-1:k+1
    c(j) = (c(j)-c(j-1))/(x(j)-x(j-k));
  end
end