function lorenz_ode_test ( )

%*****************************************************************************80
%
%% lorenz_ode_test tests lorenz_ode.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 November 2020
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../lorenz_ode' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'lorenz_ode_test\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test lorenz_ode using ode23.\n' );
%
%  Data
%
  [ beta, rho, sigma, t0, y0 ] = lorenz_parameters ( );

  f = @ lorenz_deriv;
  tspan = [ t0, 40.0 ];
%
%  Compute the approximate solution at equally spaced times.
%
  [ t, y ] = ode23 ( f, tspan, y0 );
%
%  Plot the data.
%
  clf ( );
  plot3 ( y(:,1), y(:,2), y(:,3) );
  grid ( 'on' );
  xlabel ( '<-- X -->' );
  ylabel ( '<-- Y -->' );
  zlabel ( '<-- Z -->' );
  title ( 'Lorenz ODE' );
  filename = 'lorenz_ode_test.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'lorenz_ode_test:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../lorenz_ode' );

  return
end

