function P=Divdiff(X,Y,x) coeff=Divdiffcoeff(X,Y); P=0; for j=1:10 S=coeff(j); for k=1:j-1 S=S*(x-X(k)); end P=P+S; end