% % Written by: % -- % John L. Weatherwax 2009-04-21 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % % Problem on EPage 62; Solutions on EPage 161 % %----- addpath('../../BookCode'); fn = @(x) ( abs(x).^3 + x - 6 ); xs = linspace( -4, +4, 100 ); ys = fn(xs); plot( xs, ys, '-b' ); grid('on'); fnewton(fn, @(x) c_3_p_3_fn_prime(x),-1,1.e-4) fnewton(fn, @(x) c_3_p_3_fn_prime(x),+1,1.e-4)