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
To install Math::RungeKutta, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::RungeKutta
CPAN shell
perl -MCPAN -e shell install Math::RungeKutta
For more information on module installation, please visit the detailed CPAN module installation guide.