function dydt = mackey_glass_dde ( t, y, z )

%*****************************************************************************80
%
%% mackey_glass_dde() evaluates the Mackey Glass DDE.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 September 2021
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Michael Mackey, Leon Glass,
%    Oscillation and chaos in physiological control systems,
%    Science,
%    Volume 197, Number 4300, pages 287-289, 1977.
%
%  Input:
%
%    real T, Y(1), Z(1): the time, solution, and delayed solution.
%
%  Output:
%
%    real DYDT(1): the value of the derivative.
%
  [ gamma, beta, n, tau, t0, y0, tstop ] = mackey_glass_parameters ( );

  dydt(1) = beta * z(1) / ( 1.0 + z(1)^n ) - gamma * y(1);

  return
end

