p=[1 0 -1 0];
roots(p)
q=polyder(p);
n=20;
for k=1:200
x=0.4+(0+k*0.01)/10;
z(k)=x;
for i=1:n
    xnext=x-polyval(p,x)/polyval(q,x);
    if (abs(xnext-x)<1e-6)
 y(k)=xnext;
    else
 x=xnext;
    end;
end;
end;
plot(z,y);zoom;
 

back overview