Thursday, April 12, 2012

GNU equivalent to MATLAB

Octave, or more completely Octave-forge, seems to be the free alternative to MATLAB. Since we can't buy another MATLAB license for our laptop, this was worth investigating.

Long story short, Octave can run MATLAB scripts without any modification, except for all the pieces in our code which make use of the "Fixed Point Toolbox". Octave has a Fixed Point Toolbox of its own, but it was written from scratch prior to MATLAB's and is not syntax compatible in any way.

As an aside, all the Fixed Point stuff seems universally to be used to model FPGA implementations, both in MATLAB and Octave. Makes sense.

So, if I wanted to completely rewrite our fixed point code, I could run Octave instead of MATLAB. It's almost worth it, but not quite.

Here's how to download binaries for Octave for Mac:

http://octave.org/wiki/index.php?title=Octave_for_Mac

Here's something short on the relatively minor compatibility issues between Octave and MATLAB (doesn't mention the fixed point toolbox):

http://www.csse.uwa.edu.au/~pk/research/matlabfns/octaveinfo.html

Here's something much longer on portability between MATLAB and Octave (doesn't mention the fixed-point toolbox, but a sidebar about MATLAB alone has a link to info on using MATALAB's toolbox):

http://en.wikibooks.org/wiki/MATLAB_Programming/Differences_between_Octave_and_MATLAB

Here is what seems to be the last word from the author of the Octave Fixed Point Toolbox himself, about why it's not getting any more support and why it's never going to be syntax compatible:

http://octave.1599824.n4.nabble.com/Fixed-point-arithmetic-td2284793.html

Lastly, what is with these "Free downloads" for Matlab for Mac? Given that you have to wait for a call back from Mathworks to get a trial version, not to mention their heinous price structure that has left many forum threads full of tears, how are these even out there? How likely are they to have the Fixed Point Toolbox anyhow?

http://mac.brothersoft.com/matlab.html
http://download.cnet.com/Matlab/3000-2053_4-2777.html

Sunday, April 8, 2012

VI keymapping

Generally, all I tend to use this for is adding or removing comment characters to/from large blocks of code. The most recent example sequence for setting up the map is:

:map ~ 0i%j

Here is a link to the subject stuffed with extraneous info that I didn't need to remind me of how to do this:

http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1)