Matlab and Chaos: Solving Diff. Eqs.
Matlab has some nice built-in functions for solving differential equations numerically and can do animations quite easily, so it's a handy way to explore chaotic systems (that can be represented by non-linear differential equations) without doing a whole lot of programming.
Here are some examples of using Matlab built-in "integrators".
- decay.m A simple "decay" model; first-order, linear ordinary differential equation.
- sho.m & sho_2.m Just a simple harmonic oscillator. (The second one has adjustable parameters for the spring constant and the mass.)
The physical system modeled here is a mass attached to an ideal spring which oscillates back and forth along the x-axis without friction.
- pendulum.m A simple pendulum. Nearly the same as above except the restoring force is propotional to the sine of the displacement rather than just the displacement. This makes the system non-linear (but not chaotic...yet)
- ddp.m A damped, driven pendulum. A pendulum where friction has been added (as a velocity-dependent term) and a periodic driving force keeps adding energy to the system. For some parameter ranges this system is chaotic. This one takes ~30 seconds to make the second plot (a Poincare plot--try zooming in!).
- plr.m A simple sytem described as a "piece-wise, linear, Roessler-like oscillator". It's only non-linear because of the piecewise-defined driving term in the third equation---yet, this is sufficient to make it chaotic. The three coupled equations model a simple, chaoticc electric circuit. See PRL 96 244102 (2006).