function p = horner(x,a,t)

% function p = horner(x,a,t)
% values p(t_i) of Newton-form with points x_k and coefficients a_k 

n = length(a);
p = a(n); 

for k=n-1:-1:1; 
   p = p.*(t-x(k)) + a(k);
end;

