function y=newton_eval(x,ai,xi) if length(xi)==1 y = ai(1); else y = ai(1) + (x-xi(1)) .* newton_eval(x,ai(2:end),xi(2:end)); end