fprintf ( 1, '\n' );
fprintf ( 1, 'kepler_newton:\n' );
fprintf ( 1, '  Use Newton''s method to seek a root of the kepler function.\n' );

x = 3.0;
xtol = 0.00000001;
ftol = 0.00000001;
itmax = 50;

[ x, it ] = newton ( @(x)kepler(x), @(x)kepler_fp(x), x, xtol, ftol, itmax );

fprintf ( 1, '\n' );
fprintf ( 1, '  Number of steps = %d\n', it );
fprintf ( 1, '  f(%g) = %g\n', x, kepler(x) );

