Solving ODEs in MATLAB

Midpoint Method, ODE2

Description: ODE2 implements a midpoint method with two function evaluations per step. This method is twice as accurate as Euler’s method. A nonlinear equation defining the sine function provides an example. An exercise involves implementing a related trapezoid method.

Related MATLAB code files can be downloaded from MATLAB Central

Instructor: Cleve Moler