This Matlab program that I developed used ECOS (Embedded Conic Solver) to solve the SOCP associated with the mass invariant powered descent lander problem. This program populates and scales the sparse matrices of the SOCP subject to initial conditions, state constraints, and input constraints, and is able to solve the optimal descent problem in less than a second even with thousands of variables.