function biochemical_linear_ode45 ( )

%*****************************************************************************80
%
%% biochemical_linear_ode45() uses ode45() on biochemical_linear_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 April 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'biochemical_linear_ode45():\n' );
  fprintf ( 1, '  Solve biochemical_linear_ode() using ode45().\n' );

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

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

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

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

  ye = biochemical_linear_exact ( t );

  figure ( 1 );
  clf ( );
  plot ( t, y(:,1), 'ro', t, ye(:,1), 'b-', 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<---  t  --->' );
  ylabel ( '<---  y1, y1exact  --->' );
  title ( 'biochemical_linear_ode(): ode45, y1' );
  legend ( 'y1', 'y1exact' );
  filename = 'biochemical_linear_ode45_y1.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  figure ( 2 );
  clf ( );
  plot ( t, y(:,2), 'ro', t, ye(:,2), 'b-', 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<---  t  --->' );
  ylabel ( '<---  y2, y2exact  --->' );
  title ( 'biochemical_linear_ode(): ode45, y2' );
  legend ( 'y2', 'y2exact' );
  filename = 'biochemical_linear_ode45_y2.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end
