x=fscanfMat('Newton.dat');
nl=size(x,'r');
y=zeros(1,nl-2);
z=zeros(1,nl-2);
for i=1:1:nl-2
y(i)=log(abs(x(i)-x(nl)));
z(i)=log(abs(x(i+1)-x(nl)));
end
plot(y,z,'*')
//a=(z(nl-2)-z(1))/(y(nl-2)-y(1))
//b=z(nl-2)-a*(y(nl-2))

[a,b]=reglin(y,z)
plot(y,a*y+b)
disp(a)
