function biochemical_linear_ode_test ( )

%*****************************************************************************80
%
%% biochemical_linear_ode_test tests biochemical_linear_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 February 2020
%
%  Author:
%
%    John Burkardt
%
%  Local:
%
%    real A, B: parameters.
%
  addpath ( '../biochemical_linear_ode' )

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'biochemical_linear_ode_test:\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test biochemical_linear_ode using ode45.\n' );

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

  f = @biochemical_linear_deriv;
  tspan = [ t0, 13.0 ];
  [ t, y ] = ode45 ( f, tspan, y0 );

  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 ( 'y1: Linear biochemical ode' );
  legend ( 'y1', 'y1exact' );
  filename = 'biochemical_linear_ode_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 ( 'y2: Linear biochemical ode' );
  legend ( 'y2', 'y2exact' );
  filename = 'biochemical_linear_ode_y2.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'biochemical_linear_ode_test:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../biochemical_linear_ode' )

  return
end
