function dxyzdt = rucklidge_deriv ( t, xyz )

%*****************************************************************************80
%
%% rucklidge_deriv() evaluates the right hand side of rucklidge_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 September 2021
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Alastair Rucklidge,
%    Chaos in models of double convection,
%    Journal of Fluid Mechanics,
%    Volume 237, 1992, pages 209-229.
%
%    Stephen Lucas, Evelyn Sander, Laura Taalman,
%    Modeling dynamical systems for 3D printing,
%    Notices of the American Mathematical Society,
%    Volume 67, Number 11, December 2020, pages 1692-1705.
%
%  Input:
%
%    real t: the value of the independent variable.
%
%    real xyz: the values of the dependent variables at time T.
%
%  Output:
%
%    real dxyzdt: the right hand side of the ODE.
%
  [ kappa, lambda, t0, xyz0, tstop ] = rucklidge_parameters ( );

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

  dxdt = kappa * x - lambda * y - y * z;
  dydt = x;
  dzdt = - z + y^2;

  dxyzdt = [ dxdt; dydt; dzdt ];

  return
end

