Skip to: Site menu | Main content

In-Person Exams

Midterms: 2/24, 3/24, 4/28
Final: 5/8



Matlab Scripts

Open Source Matlab Equivalent

This class will use Matlab. It is accessable on many university computers, including those in the ECE building. You may also wish to consider purchasing a copy of Matlab to use on your personal computer. The Matlab and Simulink Student Suite, available for about $100, will run all the scripts used in this class.

If you prefer free and open-source software, there are packages that have the goal of being compatible with Matlab. One of these is the GNU Octave package. It runs on Windows, iOS and Linux machines, and is reasonably easy to install. The user interface is not as polished as Matlab's, and it does not have some of the more advanced features like Simulink. However, Octave should easily run all of the scripts needed for this class.

Here are some installation directions for GNU Octave:

  1. Go to the web page Click on the blue "Download" button. Click on the gray tab that corresponds to the operating system you are using. I'm running it on a laptop running Windows 10, so I clicked the gray "Windows" tab. Select the best version. I went to the "Windows-64 (recommended)" list and downloaded "octave-6.1.0-w64-installer.exe (~ 300 MB)"
  2. After the installer.exe file was downloaded, I ran it in the same way as any other Windows 10 program, and eventually got an icon on my desktop for Octave. Double-clicking on that started Octave.
  3. For some of the scripts in this class, you will need the Octave control and signal packages. These are not part of the standard Octave install, but are freely available. If you want to see the list of all packages, go to the sourceforge web site You don't have to look at the sourceforge web site, as it is possible to download, install, and load the packages from the Octave command window, as described below.
  4. Start Octave, and go to the Command Window. You should see a >> prompt.
  5. Download and install the control package. You can do this from the Command Window. At the >> prompt enter

    >> pkg install -forge control

  6. Wait while Octave goes out to the internet, downloads the file, and installs it. This took several minutes on my laptop at home, but I have a slow internet connection, and firewall and virus detection software that looks over everything I download. In the Octave Command Window I saw two identical warning messages about LFLAGS. Eventually the Command Window gave me a message that started "For information about changes ..." and I got the >> prompt again.
  7. Download and install the signal package, with the command

    > pkg install -forge signal

    This went faster for me, and generated no warnings.
  8. Even though both packages are now "installed", you can't use them until they are "loaded". There are two ways to load them. In the Command Window, you can enter the following two commands:

    >> pkg load control
    >> pkg load signal

    While that's pretty easy, you will have to remember to do it each time you start Octave. I found it easier to put the commands in Octave's configuration file, which is executed every time Octave is started. To do this, in the Octave Command Window enter

    > edit '~/.octaverc'

    Notice that the command has two single quotes, a tilde, and a period that all must be entered exactly as typed. If Octave tells you the file does not exist, and asks you if you want to create it, pick YES. Enter the following two lines in that file

    pkg load control
    pkg load signal

    Close the editor, again picking YES if Octave asks you if you want to save changes.
  9. Close the Octave program, and re-start it. To see if the signal toolbox is installed, type

    >> help butter

    If you see comments about how this command designs a Butterworth filter, you are good to go. If you see error messages about how the command is not defined, not installed, or not loaded, something went wrong.
If you find a script that Octave will not run, please let me know.