function glycolysis_ode45 ( )

%*****************************************************************************80
%
%% glycolysis_ode45() solves glycolysis_ode() using ode45().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 January 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'glycolysis_ode45()\n' );
  fprintf ( 1, '  Use ode45() to solve glycolysis_ode().\n' );

  [ a, b, t0, y0, tstop ] = glycolysis_parameters ( );

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

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

  n = size ( t, 1 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of variable steps = %d\n', n );
%
%  Plot the solution.
%
  figure ( 1 );
  hold ( 'on' );
  plot ( t, y(:,1), 'g', 'LineWidth', 2 );
  plot ( t, y(:,2), 'r', 'LineWidth', 2 );
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( 'Time' );
  ylabel ( 'Concentration' );
  title ( 'glycolysis\_ode(): ode45() time plot' )
  legend ( 'ADP', 'FDP' );
  filename = 'glycolysis_ode45_plot.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  figure ( 2 );
  plot ( y(:,1), y(:,2), 'linewidth', 2 );
  grid ( 'on' );
  xlabel ( 'ADP' );
  ylabel ( 'F6P' );
  title ( 'glycolysis\_ode(): ode45() Phase Plot' )
  filename = 'glycolysis_ode45_phase.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

