limitcycle.ode 722 B

123456789101112131415161718192021222324
  1. # This example shows a nonlinear system with a stable limit cycle.
  2. # You may run it by typing
  3. # ode -f limitcycle.ode | graph -T X -C -x -2 2 -y -2 2
  4. # step 0,2
  5. # step 2,4
  6. # step 4,6
  7. # step 6,8
  8. # .
  9. # An orbit converging on the limit cycle will be traced out incrementally.
  10. # If you are using a color X Window System display, each segment of the
  11. # orbit will be a different color. This is a feature provided by `graph',
  12. # which normally changes the linemode after each dataset it reads. If you
  13. # do not like this feature, you may turn it off by using `graph -B' instead
  14. # of `graph'.
  15. yone' = yone + ytwo - yone*(yone*yone+ytwo*ytwo)
  16. ytwo' = -yone + ytwo - ytwo*(yone*yone+ytwo*ytwo)
  17. yone = 1
  18. ytwo = 2
  19. print yone, ytwo