Octave

Sure you can have the code, but you will need MATLAB to run it...
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

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.

A few gotchas to look out for

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

Notes on code modifications to provide Octave compatibility

In general very few modifications have been needed, indeed recently I have been able to remove many of the Octave specific modifications. I would like to thank Carnë Draug for checking over, and improving, the Octave compatibility of many of the functions. In a few cases I have had to create slightly different execution paths for Octave and MATLAB. To detect whether the code is running under Octave I am using the following test (thanks to Rosen Diankov and subsequent improvement by Carnë Draug for this).
  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 equal
this 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.

Historical Stuff

With the earier versions of Octave there was a bit of fiddling around required to get things to work. I wrote a number of functions to allow execution of my code under Octave. With Octave 3 they are no longer needed. Listed below are a few of these functions, you may possibly want the placeholder functions.