Octave seems a bit of a pain to install in Mac OS X. But there's no reason this code shouldn't work equally as well in Octave as it does here.