home *** CD-ROM | disk | FTP | other *** search
- # LORENZ.ODE
- # Lorenz chaotic attractor. Try plotting x against y, or x against t.
- # Solve with fifth order Runge-Kutta, auto stepsize, 200 steps
- $m 5
- $n 200
- # Solve from 0 to 50
- $f 0
- $t 50
- #
- # Parameters - try changing them a little bit at a time
- sigma = 10
- r = 28
- b = -8/3
- # Initial values ( try to start near the attractor, but not critical )
- x = -9
- y = -8
- z = 27
- # Differential equations
- x' = sigma*(y - x)
- y' = -y + r*x - x*z
- z' = b*z + x*y