function dydt = fitzhugh_nagumo_deriv ( t, y )

%*****************************************************************************80
%
%% fitzhugh_nagumo_deriv() returns the right hand side of fitzhugh_nagumo_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 April 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real T, Y(2), the arguments of the derivative.
%
%  Output:
%
%    real DYDT(2), the value of the derivative.
%
  [ a, b, c, d, t0, y0, tstop ] = fitzhugh_nagumo_parameters ( );

  v = y(1);
  w = y(2);

  dvdt = v - v^3 / 3.0 - w + d;
  dwdt = ( v + a - b * w ) / c;

  dydt = [ dvdt; dwdt ];

  return
end

