clear;clf;
x     =[0 1 3 4 6 7];
f(:,1)= [-5 1 25 55 181 289]'; %exp(x)'; %
xi    = 0:0.1:1;
N     = length(x);
for i=1:N-1
   for j=1:N-i
     f(j,i+1)=(f(j+1,i)-f(j,i))/(x(j+i)-x(j));
   end
   f
   dummy = 1;
end
m=5
fi = f(1,m)+(xi-x(m))*f(1,m+1);
for i = 1:m-1
   fi = f(1,m-i)+(xi-x(m-i)).*fi;
end
plot(x,f(:,1),'ko',xi,fi,'k-',xi,exp(xi),'b-','markerfacecolor','k')