home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / demo / ode.zoo / lorenz.ode < prev    next >
Text File  |  1990-04-25  |  477b  |  22 lines

  1. # LORENZ.ODE
  2. # Lorenz chaotic attractor.  Try plotting x against y, or x against t.
  3. # Solve with fifth order Runge-Kutta, auto stepsize, 200 steps
  4. $m 5
  5. $n 200
  6. # Solve from 0 to 50
  7. $f 0
  8. $t 50
  9. #
  10. # Parameters - try changing them a little bit at a time
  11. sigma = 10
  12. r     = 28
  13. b     = -8/3
  14. # Initial values ( try to start near the attractor, but not critical )
  15. x = -9
  16. y = -8
  17. z = 27
  18. # Differential equations
  19. x' = sigma*(y - x)
  20. y' = -y + r*x - x*z
  21. z' = b*z + x*y
  22.