Simply download the project files and run INSTALL_Direct_Method_Examples.m. Then you can use Run_All_Examples.m to run each method.
Please see the README at: https://github.com/danielrherber/optimal-control-direct-method-examples
Thank you for your comment and rating chou fly.
You are correct that those files are not directly included in this submission, but they will be automatically downloaded from MFX 51104 if you run the install file (INSTALL_Direct_Method_Examples.m).
LGL_nodes(), LGL_Dmatrix(), LGL_weights() are mising, which can be found here
Create scripts with code, output, and formatted text in a single executable document.