% Rex's sad implementation of newton's method function sol = newton(f,f_prime,guess,tol) max_its=10; i=0; sol=guess; while itol %Error if f_prime(sol)==0... sol=sol-(f(sol)/f_prime(sol)); i=i+1; end