function lorenz_ode23 ( )

%*****************************************************************************80
%
%% lorenz_ode23() uses ode23 to solve lorenz_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 April 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'lorenz_ode23\n' );
  fprintf ( 1, '  Use ode23() to solve lorenz_ode().\n' );
%
%  Get the parameter values.
%
  [ beta, rho, sigma, t0, y0, tstop ] = lorenz_parameters ( );

  f = @ lorenz_deriv;
  tspan = [ t0, tstop ];
%
%  Compute the approximate solution at equally spaced times.
%
  [ t, y ] = ode23 ( f, tspan, y0 );

  n = size ( t, 1 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of variable size steps = %d\n', n );
%
%  Plot the data.
%
  clf ( );
  plot3 ( y(:,1), y(:,2), y(:,3) );
  grid ( 'on' );
  xlabel ( '<-- X -->' );
  ylabel ( '<-- Y -->' );
  zlabel ( '<-- Z -->' );
  title ( 'lorenz_ode(): ode23()' );
  filename = 'lorenz_ode23.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s\n', filename );

  return
end

