function axon_euler ( )

%*****************************************************************************80
%
%% axon_euler() solves the axon ODE using euler().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 April 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'axon_euler\n' );
  fprintf ( 1, '  Solve the axon ODE using euler()\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 ];
  nt = 1000;
  fprintf ( 1, '  Number of fixed time steps = %d\n', nt );

  [ t, y ] = euler ( f, tspan, y0, nt );
%
%  Plots.
%
  plot ( t, y(:,1), 'r-', 'linewidth', 3 );
  title ( 'axon ODE, V(t), euler solver' );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- V(T) --->' );
  filename = 'axon_v_euler.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

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

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

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

  return
end
