Tuesday, 25 December 2012

Free Numerical Analysis Software Alternatives to MATLAB [Improved]

MATLAB has become the benchmark standard of numerical analysis software used in all of academia and engineering. MATLAB's most prominent and favourable features includes that it has a diverse array of toolboxes and functions and has pretty much all the tools one requires for numerical analysis. The only real limitation of MATLAB is its pricing and the fact that only people with the intent to use it through the course of university subjects, or for academia and lastly for industrial use can in fact legally obtain it. Fortunately, however, there are quite a few worthy free and often open-source competitors of MATLAB including:
The natural question of course is, "Which of these free softwares best replace MATLAB?" The answer is of course not very simple as it does heavily depend on a few factors such as:
  • How do you plan to use it?
  • Do you know how to operate NumPy or SciPy? 
  • How much compatibility with MATLAB's syntax do you require?
If you are not knowledgeable and experienced when it comes to NumPy and SciPy then Spyder quickly drops from the list, not that it is a particularly attractive competitor. Lastly, if you require a great deal of compatibility in the syntax, that is, to MATLAB then Spyder looses favour and GNU Octave and FreeMat become the most attractive competitors.

To give you a run down in as far as how the aforementioned competitors do on the different tests of functionality here's a table where all competitors are ranked on a scale of one to five with respect to the different aspects of suitability for your personal use.

Comparison of the Seven Free MATLAB Alternatives

Suitability Aspect

MATLAB1

GNU Octave

QtOctave

Scilab

FreeMat

Spyder

Sage/Sagemath

Numerical Analysis capability 5 5 5 5 4-5 5 5
Ease of Use2 5 13 4-5 4-5 4-5 5 3n,4 5s
MATLAB syntax compatibility 5 ~55 ~5 3-4 ~56 1 ~57
Documentation quality 5 4 4 5 ~4 5 5
Knowledge of NumPy and/or SciPy required or helpful? No No No No No Required Optional but might be helpful
Reads M files? Yes8 Yes Yes No9 Yes No Yes8
Able to perform symbolic calculations? Yes, with an additional toolbox Yes, with an additional package10 Yes, with an additional package10 Yes, with an additional toolbox11 No Yes with some modification12 Yes
Has a file exchange13 or equivalent? Yes Yes14 Yes14 Yes Yes14 No Yes14
Latest stable release September 11 2012 - R2012b September 04 2012 - 3.6.3 June 2011 - 0.1015 October 01 2012 - 5.4.0 November 28 2012 - 4.1 July 29 2012 - 2.1.1 December 21 2012 - 5.5
Platform 16 Windows, Mac OS X, Linux17 Windows18, Mac OS X19, Linux Windows20, Mac OS X20, Linux 20 Windows21,Mac OS X21, Linux21 Windows, Mac OS X, Linux Windows, Mac OS X, Linux Windows22, Mac OS X, Linux

Footnotes

n - for numerical analysis purposes.
s - for symbolic manipulations.
1 - as a comparison.
2 - in terms of how easy it is to use the interface beyond just basic commands.
3 - command-line interface; no GUI that comes with the package.
4 - it allows you to create separate 'notebooks' and you can have several GNU Octave scripts in each but it is problematic when it comes to organisation scripts.
5 - the incompatibilities are mostly helpful ones except instead of the different ode solvers of MATLAB there's lsode which has different integration techniques available.
6 - The incompabilities, from what I am aware at least, are due to the fact that FreeMat is lagging considerably in its development.
7 - when interfaced with GNU Octave, that is.
8 - requires you to type source('mfile.m') where, of course, mfile is the file in question and its location. In the case of sage you can copy the contents of said m file directly into a sage notebook.
9 - comes with a MATLAB to Scilab code converter that's sometimes requires some user input to get the code right.
10 - which is available for free (with instructions of how to integrate it into your GNU Octave installation) at the Sourceforge - Octave
11 - scimax
12 - I'm afraid I don't know how to do this but I hear it is possible.
13 - a website where users of said software exchange codes they have developed with specific problems or functions in mind.
14 - that is, if you use MATLAB file exchange because of the high compatibility of GNU Octave codes and MATLAB codes.
15 - the QtOctave itself the GNU Octave part's latest release is above.
16 - i.e. which Operating Systems it can run on.
17 - although it is technically supported for Linux some users of the Linux distribution, Ubuntu, have reported difficulty in installing it and using it on their computer.
18 - the releases are in source code so you need to make your installation from them. For Windows 32 bit 3.2.4 has been released as an executable file
19 - I'm not a Mac OS X user so I do not know how GNU Octave fairs on this particular OS.
20 - I have know idea about using QtOctave on any other OS than the Linux distribution Ubuntu.
21 - I have installed Scilab on Windows 7 successfully, Ubuntu 12.04 and 12.10 without a problem as for Mac OS X I have never tried but I presume it is easy as most screenshots of Scilab I have seen were in Mac OS X.
22 - it is available on Windows OSs by means of virtualisation software, however, the development of sage in terms of virtualisation files is lagging and is presently at 5.1.