Skip to main content
. 2020 Dec 28;16(12):e1008493. doi: 10.1371/journal.pcbi.1008493

Fig 3. Example code for a simple problem.

Fig 3

This MATLAB code uses Moco to find the force to apply to a point mass to move the mass by one meter (starting and ending at rest) in minimum time. Solving this problem requires only 9 lines of code.