Answer:
function [rt,n_iter]=newtonsMethod(f,df,x0,tol,max_iter)
rt=x0;
if(abs(f(rt))<tol)
n_iter=0;
return;
end
for i=1:max_iter
rt=x0-f(x0)/df(x0);
break;
x0=rt;
n_iter=i;
Step-by-step explanation:
3.4m questions
4.4m answers