Fxed point iteration

"func5_2.m"

function f = func5_2(x)
f = x-(x.^3+4*x.^2-10)./(3*x.^2+8*x);

"practise5_1.m"

M = 1000;
p0 = 1.5;
N = 1;
TOL = 1.0e-5;

while (N < M)
p1 = func5_2(p0);

if (abs(p1-p0) < TOL)
display(p1)
return;
else
p0=p1;
end

end

display('Method failed after 1000 time steps');
