function quasiperiodic_ode23 ( )

%*****************************************************************************80
%
%% quasiperiodic_ode23() uses ode23() to solve quasiperiodic_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 April 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'quasiperiodic_ode23():\n' );
  fprintf ( 1, '  Use ode23() to solve quasiperiodic_ode().\n' );

  [ t0, y0, tstop ] = quasiperiodic_parameters ( );

  f = @ quasiperiodic_deriv;
  tspan = [ t0, tstop ];

  [ t, y ] = ode23 ( f, tspan, y0 );

  n = size ( t, 1 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of variable steps = %d\n', n );

  clf ( );
  hold ( 'on' );
  plot ( t, y(:,1), 'bo', 'linewidth', 2 );
  y2 = quasiperiodic_exact ( t );
  plot ( t, y2(:,1), 'r-', 'linewidth', 2 );
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( '<-- Time -->' );
  ylabel ( '<-- Y(T) -->' );
  legend ( 'ODE23', 'Exact' );
  title ( 'quasiperiodic_ode().' );

  filename = 'quasiperiodic_ode23.png';
  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved in "%s"\n', filename );

  return
end

