function doughnut_ode23 ( )

%*****************************************************************************80
%
%% doughnut_ode23() uses ode23() to solve doughnut_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 October 2025
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'doughnut_ode23\n' );
  fprintf ( 1, '  Use ode23() to solve doughnut_ode().\n' );
%
%  Get the parameter values.
%
  [ m, n, t0, y0, tstop ] = doughnut_parameters ( );

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

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

  return
end

