My information

Main course page

Midterm 1 review problems

Final exam review problems

Code examples

These may differ slightly from the code presented in class. Also, probably all of these have significant room for improvement.
  1. Random rotation in Matlab
  2. Plotting the unit ball for the p-norm in two dimensions
  3. Very basic demo of sparse and full matrices
  4. Evaluating all the Legendre polynomials up to a given degree at given points
  5. Fitting a line to a bunch of points, three different ways.

    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:


  6. Our test functions for programming assignment #1. The bounds for the graphs are the intervals we tested your code on.
  7. Programming assignment #2 reference implementations: