Double pendulum simulation matlab. The Lagrangian method was used to model the system.