function dydt = heartbeat_deriv ( t, y )

%*****************************************************************************80
%
%% heartbeat_deriv() evaluates the derivative for heartbeat_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 March 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real T, Y(1,2): the arguments of the derivative.
%
%  Output:
%
%    real DYDT(2,1): the value of the derivative.
%
  [ a, epsilon, gamma, t0, y0, tstop ] = heartbeat_parameters ( );

  dydt = [ ...
    - 1.0 / epsilon * ( y(1).^3 - a * y(1) + y(2) );
    y(1) - gamma ];

  return
end
