function fitzhugh_nagumo_ode45 ( )

%*****************************************************************************80
%
%% fitzhugh_nagumo_ode45() calls ode45() to solve the Fitzhugh-Nagumo ODE.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 April 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'fitzhugh_nagumo_ode45():\n' );
  fprintf ( 1, '  Solve the Fitzhugh-Nagumo ODE using ode45().\n' );

  [ a, b, c, d, t0, y0, tstop ] = fitzhugh_nagumo_parameters ( );

  dydt = @ fitzhugh_nagumo_deriv;
  tspan = [ t0, tstop ];
  
  [ t, y ] = ode45 ( dydt, tspan, y0 );
%
%  Time plot of v(t), w(t).
%
  figure ( 1 );
  plot ( t, y, 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<-- T -->' );
  ylabel ( '<-- V(T), W(T) -->' );
  title ( 'Fitzhugh-Nagumo ode45' );
  legend ( 'v(t)', 'w(t)' );
  filename = 'fitzhugh_nagumo_ode45_plot.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Phase plot.
%
  figure ( 2 );
  clf ( );
  hold ( 'on' );
  plot ( y(:,1), y(:,2), 'linewidth', 3 );
  plot ( y(1,1), y(1,2), 'g.', 'markersize', 40 );
  plot ( y(end,1), y(end,2), 'r.', 'markersize', 30 );
  hold ( 'off' );
  axis ( 'equal' );
  grid ( 'on' );
  xlabel ( '<-- V(T) -->' );
  ylabel ( '<-- W(T) -->' );
  title ( 'Fitzhugh-Nagumo ode45 phase plot' );
  filename = 'fitzhugh_nagumo_ode45_phase.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

