Thursday, July 6, 2017

Using Octave in Place of Matlab

Matlab, from MathWorks is a very powerful program designed to perform technical computing with matrix-based mathematics (which includes arrays). It's used extensively by mathematicians, scientists, and engineers to analyze their data. I'm using now at NNU to analyze images of fruit trees recorded by drones and from the ground.

Checking the MathWorks website, I see there's a home edition available for $149. Additional Add-ons at $45 each allow you to increase the functionality of Matlab and even perform simulations (using Simulink).  The home edition webpage contains links on how Matlab was used for things like an Arduino-based weather station. And at $145, the cost really isn't too much when you consider how much we pay for other productivity software.

I'm however, looking into using a program named Octave to perform the same analysis that I am using Matlab do to. The reason I'm testing Octave is that it's freeware under the GNU General Public License. Using Octave in place of Matlab let's my classroom analyze drone-recorded images while saving money. My students will  then be able to install the freeware at home and complete their homework at their leisure (and I hope take up an interest in mathematical computing).

You can download the Window's version of Octave  and then install it on as may PCs or laptops as needed. I found that Octave, like Matlab does not have an image package built in. So you'll also need to download the Image Package separately and then install it. Loading the Image Package is done from the Octave Command Window by typing the following command,

pkg load image-2.6.1.tar.gz

Note that every add-on package is installed using the same syntax. In the case above, the Image Package is a compressed file called image and its version number is 2.6.1. The only issue I'm less than happy about how Octave doesn't generate a message after the successful completion of a package install. So I was uncertain if the install was complete or of I needed to wait a while longer. However, Octave will generate an error message if the install fails.

You might want to install multiple packages into Octave, so repeat the above command with every package. If you lose track of the installed packages, type the command below into the Command Window.

pkg list  

Octave generates a message listing every package installed as shown below.

After installation, you'll need to load the Image Package every time you start Octave. This is done in the Command Window by typing the following command,

pkg load image

Well, that's all you need to do to install Octave and its Image Package on a PC or laptop. I'll keep testing Octave to verify it does everything my classroom needs to analyze images from their drones next year. The 2017-2018 school year promises to be very exciting and I think my engineering students are going to love it.



  1. Paul,
    Have you looked at ImageJ?

  2. I've not heard of it. I guess I have a homework assignment now. Thanks for the suggestion.