Monday, January 4, 2010

Matlab's free cousin Octave

My educational/work background is in experimental science. Therefore, much of what I've done for work purposes involves processing data, plotting data, and analyzing data. I did most of the data processing and plotting in Matlab. Matlab is a fantastic language for scientific computation which is even available for Linux. Of course, the downside to Matlab is that liscences for it cost big bucks outside of academia!

Recently, I discovered another language for scientific computation called Octave. The amazing thing about it is that it is a free-to-download, extensively Matlab-like language! In other words, if you already know Matlab, you barely have to learn anything new in order to use Octave. The functionality is VERY similar, with Octave able to do things like Matrix operations, Signal Processing, Statistics, Scripting and Plotting. I installed Octave in Ubuntu by typing
sudo apt-get install octave
into the terminal. Unexpectedly, Octave came packaged in the Ubuntu repository with QtOctave, a complete graphical development interface for working with scientific data. Check out the screenshot below:




As you can see, the GUI includes the most important elements found in the Matlab GUI:
  • The command prompt
  • A command history
  • An area to access all the variables/data loaded into memory
  • A filesystem navigator
  • Finally, a script editor window (accessible via the fat red pen icon
I loaded the download speed data that I sampled last week into Octave and did some modelling to extract the general trend that the download speeds followed. I made a graph of the data and modelling in Octave to see how it looked.




If you've ever done any plotting in Matlab, you'll recognize the same graphics quality in the graph above. Just like Matlab, the default plotting parameters aren't the prettiest, but that's okay. The important thing is that Octave is free, it's sophisticated, and very easy to use for Matlab veterens!

2 comments:

  1. For another good time, try FreeMat. It is a very simple and compatible (works with .m files and standard MatLab formatting) numeric tool. This is written for both Linux and Windows.

    ReplyDelete
  2. qtoctave is dead. There is another one Xoctave from www.xoctave.com

    ReplyDelete