Skip to content

Instantly share code, notes, and snippets.

@fusion809
Created January 5, 2016 02:22
Show Gist options
  • Save fusion809/21a43c7199d64d86255f to your computer and use it in GitHub Desktop.
Save fusion809/21a43c7199d64d86255f to your computer and use it in GitHub Desktop.
Lorenz function for GNU Octave
function dy = lorenz(y,t)
dy = zeros(3,1);
P = 10;
r = 28;
b = 8/3;
dy(1) = P*(y(2) - y(1));
dy(2) = -y(1)*y(3) + r*y(1) - y(2);
dy(3) = y(1)*y(2) - b*y(3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment