Unfortunately, you will not be able to run this without Matlab's optimization toolbox. I apologize for this; I did not realize this requirement when I wrote this demo, since our department's installation of Matlab (that grad students use) does have the optimization toolbox. Alternatively, you can implement your own linear program solver and use that instead of matlab's "linprog", but that is beyond the scope of this course.
Here are example figures obtained by running the following command:
test_fit01(1000,750,0.02)