Using dsolve for numerical integration of differential ...

Now the solution is a piece of cake. We specify the length of the pendulum, the initial values, and the time over which we want to calculate and then we’ll call ode45, which is Matlab’s adaptive step Runga-Kutta solver. L = 1.0; % length in meters. initialValues = [pi/2, 0]; % … ................
................