Peter Billam >
Math-RungeKutta >
sine-cosine

sine-cosine - Perl script to explore Math::RungeKutta

perl exapmles/sine-cosine

This script uses *Math::RungeKutta* to integrate the equations *dy0/dt=y1 dy1/dt=-y0* from *t=0* to *t=2pi* which of course should give one cycle of sine and cosine waves.

It uses *Term::Clui* to give you a choice of the various methods that *Math::RungeKutta* offers, and of a selection of timestep values or error criteria.

Peter J Billam www.pjb.com.au/comp/contact.html

Based on Math::RungeKutta and Term::Clui

examples/exponentials, examples/three-body, Math::RungeKutta, Term::Clui

syntax highlighting: