Once the equations of motion are obtained, he then uses the code generation capability of the Symbolic Math Toolbox to create a Simscape component and simulate the system in Simulink.
In his MATLAB Central submission Euler–Lagrange equation, Hitoshi shows how the Symbolic Math Toolbox can be used to easily obtain the equations of motion of a system by simply defining the energies involved. I am recently visited the MathWorks Japan office and learned about interesting work done by my colleague Hitoshi Takeshita.