Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to find an alternative for Matlab and have so far found:

  • Octave
  • Spyder
  • Freemat
  • Scilab

I'm trying to find which is the best alternative to Matlab. I'm particularly concerned with performance and the integrity of the results.

share|improve this question

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

You should also consider R. This question on StackOverflow probably has the best comparison –  Oli Nov 17 '11 at 15:38
IPython is missing –  zetah Nov 20 '11 at 3:03

8 Answers 8

Well you're in for a treat I have used all the programming languages/software you mentioned. FreeMat and Spyder I do not have too much experience with but I have some. The others I am experienced in.

GNU Octave by far beets the competition. Its syntax has an extreme compatibility with that of MATLAB. The only differences, I'm aware of at least, aside from the odd toolbox, which you can attempt to replace by the packages here is that GNU Octave can define functions from the command line.

I don't know if you're aware of QtOctave. QtOctave is a frontend (GUI) for the GNU Octave programming language. QtOctave comes with an editor too.

Scilab is an adequate replacement for MATLAB too. It has some differences in terms of syntax but nothing you can't get your head around if you search the documentation that comes with it.

FreeMat is the worst, in my opinion at least, of software that's syntax is heavily based on MATLAB. My evidence for this is three part: firstly, in the software centre it receive the lowest star rating of the four software in question. Second, it isn't frequently updated the latest version in the software centre-- it was last updated 2008. Third as a result of my second piece of evidence its functions are somewhat lagging. The plus side, however, is that its syntax is highly compatible with MATLAB's.

I have used Spyder, but only briefly I'm afraid. It seems top-quality. The problem with it is that it has only limited compatibility with MATLAB, syntax wise. It requires you to learn some of the python programming language, that is, if you plan to do well at it.

I would also recommend Sage as it includes GNU Octave, (if its already installed on your system) Scilab, (if you already have it installed) Numpy, [Numpy and the rest mentioned unless otherwise specified come with Sage and therefore no installation is necessary] Scipy, Matplotlib, maxima, fortran among many others. Sage may be downloaded by going to the website http://www.sagemath.org/download-linux.html and selecting a suitable mirror, based on where you are and then installing the relevant .tar.lzma file. After this copy and paste the following commands into terminal (ctrl+alt+T):

cd ~/Downloads
sudo mv sage-linux-xbit-ubuntu_y-z-Linux.tar.lzma /home/username
cd ~
tar --lzma -xvf sage-linux-xbit-ubuntu_y-z-Linux.tar.lzma
cd ~/sage-linux-xbit-ubuntu_y-z-Linux
sudo ln -s /home/username/sage-linux-xbit-ubuntu_y-z-Linux/sage /usr/local/bin/sage

Where 'x' refers to the bits of your OS; 'y' refers to the version of Ubuntu the sage is designed for (e.g. 10.04_lts; 12.04_lts (the _lts is required in 'y'), etc.); 'z' refers to the architecture of your OS. (i386, amd64, etc.)

share|improve this answer

Just for clarification: Why do you want an alternative for Matlab? The answer of prasadkumar013 suggests you can't use Matlab on Ubuntu, but you can (at least I am running it on Ubuntu ;) ). There is a community documentation on the page https://help.ubuntu.com/community/MATLAB.

In case you want a free alternative go with octave, most of the matlab code will work directly in octave. Try to work in the terminal though, the qtoctave GUI was not so user friendly in my opinion.

share|improve this answer

Of all the ones you have listed Octave is the most syntax compatible. In fact, apart from some of the expensive Matlab toolboxes, Octave should run 98% (a number I just made up) of your code. I use Matlab at work and Octave at home.

Octave will not run (natively) some of the inbuilt GUIs like inputdlg etc, if you install Qtoctave (an IDE for Octave, sudo apt-get install qtoctave) you can use xmlwidget and a wrapper to get that functionality (I can post code if you are interested).

As far as performance is concerned, Octave is not as fast (google for benchmarks). However, you can get all modern versions of Matlab running on Linux (if you have a licence) and they are included on the install disk by default now, and performance of Linux version of Matlab is as good and often better on Linux when compared to Windows.

If you want performance and you wan't to use free software best to look at scipy. But the syntax is less compatible. You will need to rewrite you code. Spyder is an ide that uses python and scipy, scilab is a mash of octave and maxima and a few others. Not sure about performance of freemat but I don't think it is as developed as Octave.

Good luck.

A few benchmarks




Remember benchmarks are subjective. There are many variables. The only true way to know is to test them all on your rig using your processing code.

share|improve this answer
If someone does google and find good benchmarks for Octave vs. Matlab, perhaps more detailed information or links could be edited into this answer. –  Eliah Kagan Jun 18 '12 at 23:59

this may help you. This is nice paper.

It has brief explanation and various tests done.

BTW I don't use MATLAB or anything like that.

share|improve this answer


PDL ("Perl Data Language") gives standard Perl the ability to compactly store and speedily manipulate the large N-dimensional data arrays which are the bread and butter of scientific computing.

share|improve this answer

Have you already tried Sage (www.sagemath.org)? It's a container for different mathematics software and it can do symbolic and numerical calculations. The latter ones are done using numpy and scipy. It has a very active community and it's an open source project written in python.

Since you're interested in performances, here there are some benchmarks (at the end of the page also comparisons with Matlab).

share|improve this answer

I have not done a real comparison but in my experience purely form a performance perspective octave is better than MATLAB.

You should note that "it is all relative" different toolboxes have different performances.

If you have limited RAM on your machine I would say anything would work better than MATLAB.

share|improve this answer

My college uses MATLAB on their Windows PCs. But for using MATLAB on Ubuntu I had been left with two choices

  1. Install MATLAB over wine or any virtualization software
  2. Find a Linux Equivallent

As virtualization is very heavy on my laptop, I searched for an alternative. After many software trials, I finally settled for OCTAVE. It can run most of the standard MATLAB codes. Instead of GNU Octave, it is better to go for qt Octave. While the former is terminal based, the later is GUI based. My choice is to go for qt Octave

sudo apt-get install qtoctave

share|improve this answer
A third choice would be to install the Linux version of Matlab. –  Eliah Kagan Jun 19 '12 at 0:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.