MATLAB is great, but it is expensive. GNU Octave is a very viable alternative. Octave runs under Linux, Windows and Mac OS X.

With the release of Octave 3 many of the remaining incompatibilities between Octave and MATLAB have been eliminated and the graphics much improved. Plotting and image display may not be as fast or as polished as it is under MATLAB but you can do pretty well everything you want to. Most of your MATLAB code will run under Octave with no modifications required.

You will also find that Octave has a number of features that are improvements on MATLAB. For example you can create stand-alone executable scripts, you can write sin(x)(1:10); rather than being forced to write y = sin(x); y = y([1:10]); and you can specify default argument values for functions, to name a few.

The installation of Octave is straightforward and the installation of packages (Octave's equivalent of MATLAB toolboxes) has been streamlined.

I suggest you check the following links

- The Octave home page Download Octave and get documentation here.
- GNU Octave-Forge Package Repository Get your packages (toolboxes) here. I suggest you start with the image, signal, optim, plot and miscellaneous packages.

Please do not mail me about any Octave installation problems, I will not know how to help you. You should refer to the appropriate FAQ pages.

This list of gotchas is diminishing all the time and very few remain...

- Display of colour images can be washed out. This seems to be caused by the rgb colormap having only 64 entries. If I create a 256 element colormap images are displayed fine. At least this is what I find with my Mac OSX installation.
- Some image processing toolbox functions test the input image
against the function
`isgray`which, if your data is of type double, only returns true if all values lie in the range [0 1]. If you get an error message saying your gray scale image is not a gray scale image you probably need to rescale its values to [0 1]. - I have found on odd occasions (that I have difficulty replicating) that the SVD in 'economy' mode can sometimes be too economical and I lose a dimension in the decomposed matrices.

Octave = exist('OCTAVE_VERSION', 'builtin') == 5;

While MATLAB allows one to pass string arguments to functions without enclosing quotes and brackets, for example

warning off axis equalthis is not (always) allowed under Octave. However, by writing code in the proper functional form such as

warning('off'); axis('equal')compatibility under both MATLAB and Octave can be maintained. With Octave 3 this problem is mostly eliminated.

- fspecial.m replacement for MATLAB fspecial. Note the current image package now has an implementation of fspecial (which incorporates some of this code). This link is just here for historical reference.
- truesize.m Placeholder function that does nothing except allow code written for MATLAB handle-graphics to at least execute under Octave.
- pixval.m Placeholder
- rotate3d.m Placeholder