function dxyzdt = roessler_deriv ( t, xyz )

%*****************************************************************************80
%
%% roessler_deriv() evaluates the right hand side of roessler_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 September 2021
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Otto Roessler,
%    An Equation for Continuous Chaos,
%    Physics Letters, 
%    Volume 57A, Number 5, pages 397–398, 1976.
%
%  Input:
%
%    real t: the value of the independent variable.
%
%    real xyz(3): the values of the dependent variables at time T.
%
%  Output:
%
%    real dxyzdt(3): the right hand side of the ODE.
%
  [ alpha, beta, mu, t0, xyz0, tstop ] = roessler_parameters ( );

  x = xyz(1);
  y = xyz(2);
  z = xyz(3);

  dxdt = - y - z;
  dydt = x + alpha * y;
  dzdt = beta + ( x - mu ) * z;

  dxyzdt = [ dxdt; dydt; dzdt ];

  return
end
