MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / lorenz

Function lorenz

galleries/examples/mplot3d/lorenz_attractor.py:21–39  ·  view source on GitHub ↗

Parameters ---------- xyz : array-like, shape (3,) Point of interest in three-dimensional space. s, r, b : float Parameters defining the Lorenz attractor. Returns ------- xyz_dot : array, shape (3,) Values of the Lorenz attractor's partial derivativ

(xyz, *, s=10, r=28, b=2.667)

Source from the content-addressed store, hash-verified

19
20
21def lorenz(xyz, *, s=10, r=28, b=2.667):
22 """
23 Parameters
24 ----------
25 xyz : array-like, shape (3,)
26 Point of interest in three-dimensional space.
27 s, r, b : float
28 Parameters defining the Lorenz attractor.
29
30 Returns
31 -------
32 xyz_dot : array, shape (3,)
33 Values of the Lorenz attractor's partial derivatives at *xyz*.
34 """
35 x, y, z = xyz
36 x_dot = s*(y - x)
37 y_dot = r*x - y - x*z
38 z_dot = x*y - b*z
39 return np.array([x_dot, y_dot, z_dot])
40
41
42dt = 0.01

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…