function axon_ode45 ( )

%*****************************************************************************80
%
%% axon_ode45() solves the axon ODE using ode45().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 April 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'axon_ode45():\n' );
  fprintf ( 1, '  Solve the axon ODE using ode45()\n' );
  fprintf ( 1, '\n' );
%
%  Get the parameters.
%
  [ C, E_K, E_Na, E_rest, G_K, G_Na, t0, y0, tstop ] = axon_parameters ( );

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

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

  nt = size ( t, 1 );
  fprintf ( 1, '  Number of variable time steps = %d\n', nt );
%
%  Plots.
%
  plot ( t, y(:,1), 'r-', 'linewidth', 3 );
  title ( 'axon ODE, V(t), ode45 solver' );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- V(T) --->' );
  filename = 'axon_v_ode45.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  plot ( t, y(:,2), 'r-', 'linewidth', 3 );
  title ( 'axon ODE, N(t), ode45 solver' );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- N(T) --->' );
  filename = 'axon_n_ode45.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  plot ( t, y(:,3), 'r-', 'linewidth', 3 );
  title ( 'axon ODE, M(t), ode45 solver' );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- M(T) --->' );
  filename = 'axon_m_ode45.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  plot ( t, y(:,4), 'r-', 'linewidth', 3 );
  title ( 'axon ODE, H(t), ode45 solver' );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- H(T) --->' );
  filename = 'axon_h_ode45.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'axon_ode45:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
