Source: https://www.math.union.edu/~wangj/courses/previous/math238w13/ODE_Matlab.pdf