function z = Lagrange(x,y,c,t)
%  Computes the Lagrange polynomial at the
%  parameter value t, given data point vectors
%  x and y and divided difference coefficients
% in the vector c.

m = max(size(x));
z = t - t + c(m);
for k = m-1:-1:1
   z = z .* ( t - x(k) ) + c(k);
end