Software

We will be using Python (version 3.5 or higher) for programming in this course, leaning heavily on the following three packages:

We will use a handful of demo routines in Python that live here. If you put the whole cs111/ directory on your PYTHONPATH, you can import all the class software with “import cs111” and then call the routines as for example “x = cs111.LUsolve(A,b)”.

We will use Jupyter notebooks to run Python interactively, in a web browser, both for demos in class and for your programming assignments. I strongly recommend that you set up your own laptop or computer to run Jupyter and Python 3 (and numpy, scipy, and matplotlib). The easy way to do this is to download Anaconda, which will install everything you need. The t.a.s will demo the setup process in the first section, on Wednesday, January 8.

It’s also possible to run Python in a Jupyter notebook in a web browser at CSIL. You can go that route if it works better for you, but it’s much easier to run everything on your own computer. (That’s what I do.)

Previous versions of this course used MATLAB, which is a proprietary interactive numerical software package that’s widely used in engineering. (UCSB has a campuswide MATLAB license.) Numpy is designed to look a lot like Matlab. They both use arrays and matrices as their main data structures; the advantage of numpy is that you also have all of Python available. If you already know Matlab, here is a cheat sheet for translating Matlab into numpy. The matplotlib library that we will use for plotting also has a lot of similarity to Matlab’s plotting routines.