function y=NDDPolyEval(a,x0,x) %function y=NDDPolyEval(a,x0,x) % % Inputs: % a - coefficients for divided difference polynomial % x0 - vector of x values that generated coefficients % x - vector of x values for which we evaluate the polynomial % Output: % y - P(x) values % % See also: NDD.m n=length(x0); y=a(n); for k=(n-1):-1:1 y=y.*(x-x0(k))+a(k); end