close
clear all
p=input('p=');
x=input('x=');
z(1)=input('z(1)=')
q=polyder(p);
hold off
y=polyval(p,x);
plot(x,y,'r')
hold on
for j=1:6
	z(j+1)=z(j)-polyval(p,z(j))/polyval(q,z(j));
	plot(z(j),0,'*')
	pause(3)
end
[z' polyval(p,z)']
