Code covered by the BSD License  

Highlights from
Numerical Methods Using MATLAB, 3e

image thumbnail

Numerical Methods Using MATLAB, 3e

by

 

20 Aug 2002 (Updated )

Companion Software

sroot(a)
function r = sroot(a)

p0=1;

for k=1:50
   p1=(p0+a/p0)/2;
   disp(p1);
   if abs(p1-p0)/p1 < eps, break, end;
   p0=p1;
end

Contact us