function kepler_perturbed_ode_test ( )

%*****************************************************************************80
%
%% kepler_perturbed_ode_test tests kepler_perturbed_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 February 2020
%
%  Author:
%
%    John Burkardt
%
%  Local:
%
%    real E: the eccentricity.
%
  addpath ( '../kepler_perturbed_ode' )

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'kepler_perturbed_ode_test:\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test kepler_perturbed_ode using ode45.\n' );

  e = 0.6;

  f = @kepler_perturbed_deriv
  tspan = [ 0.0, 120.0 ];
  pq0 = [ 1.0-e, 0.0, 0.0, sqrt((1.0+e)/(1.0-e)) ];

  [ t, pq ] = ode45 ( f, tspan, pq0 );

  figure ( );
  plot ( pq(:,1), pq(:,2) );
  grid ( 'on' );
  xlabel ( '<---  q1  --->' );
  ylabel ( '<---  q2  --->' );
  title ( 'Perturbed Kepler Phase Plot' )
  filename = 'kepler_perturbed_ode_phase.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'kepler_perturbed_ode_test:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../kepler_perturbed_ode' )

  return
end
