Computing for optimization

The programming and computational portions of this course are important, and students will need to work at these parts, but I am very flexible about how you accomplish them.

You will want to use one of the following languages:

You can turn in homework and projects using any of these. For a concrete comparison of Matlab/Octave versus Python, see my short note on Programming languages compared.

Note that I will support Matlab/Octave by providing lots of examples, both in-class and as the posted solutions to exercises. I will not support Python and Julia in this manner.

The above languages are all reasonably natural for linear algebra. Tutorials are often not needed for standard tasks, but they are available online, and furthermore you should feel free to ask programming questions in class! Yes, I’m happy to answer “dumb syntax” questions. (I have such questions all the time about new computer stuff! For new languages, everyone gets hung-up at some point on what to type next.)

Matlab and Octave

Here is a guide to getting started in Matlab or Octave, which are essentially equivalent as programming languages. Note that Matlab, a commerical product, is more polished than the free and open-source Octave.

Getting Matlab online

First, Matlab online is free to UAF students by using your @alaska.edu address. Go to www.mathworks.com/products/matlab/student.html and check for campus-wide access. You should get an email saying you can sign up for a Mathworks account. Once you are signed in, namely at matlab.mathworks.com, you can click on the Open MATLAB Online button. Because you use this through a browser, it may sometimes be slow because of internet issues.

Getting Matlab running on your computer

You can download the student version of Matlab as an executable at www.mathworks.com/store/link/products/student/SV. (This may be free too for a @alaska.edu address.)

Getting Octave

You can always go to octave-online.net in a browser and just start using it. Because you use this through a browser, it may sometimes be slow because of internet issues.

Downloading the Octave executable is also free. I use it on my Linux machines instead of Matlab. See the Download tab at www.gnu.org/software/octave/index; there are executables for Windows, macOS, and Linux.

Learning Matlab/Octave

My basic advice is to just start trying to use it as a calculator, and as a function plotter and such. Within a few days you’ll be used to the basic language. If you want tutorials and videos, the Mathworks official material is great: www.mathworks.com/support/learn-with-matlab-tutorials.html.