Numerical Simulation

- Matthew Kelly


Simulation methods in Matlab

← 4th-order Runge-Kutta

A fully vectorized implementation of 4th-order Runge-Kutta for Matlab. This method is a great general-purpose method that is accurate but not too difficult to compute.

← Bulirsch-Stoer Integration

Bulirsch-Stoer integration is used in applications where extreme accuracy is required. It is fairly difficult to code up when compared to other methods. It works by solving the integration step using the midpoint method over several different grid spacings. Then Richardson Extrapolation is used to estimate the value as the grid spacing goes to zero.

← Bouncing-Ball: Tutorial for ode45 events

Matlab's ode45() integration command is one of the most common ways to simulate dynamical systems. It performs variable step Runge-Kutta using a combined 4-5 order method. In this tutorial I show how to use the events feature that is built into the solver to simulate a ball bouncing over a curving landscape.



Runge-Kutta in C++

← General-Purpose Runge-Kutta

Runge-Kutta integration is a popular framework for solving initial-value problems. This implementation includes several of the most common Runge-Kutta schemes, as well as some higher-order methods. The code reads the Butcher Table for each method, so it is easy to test on different methods.