MATLAB function and script for 4th order Runge-Kutta method.
rungeKutta4(ode, y0, h, range)
Solves the given ODE (ordinary differential equation) with given initial condition y0, step size h and range.
mainscript.m
script uses the function for solving and visualizing using RK4.