Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why/when should I prefer MATLAB over Octave?

Tags:

matlab

octave

In our shoestring operation we need to prototype algorithms in some higher-level language before committing to a C implementation on embedded hardware.

So far we have been using MATLAB to do that, but the licensing costs are beginning to hurt. We're considering porting our MATLAB code to Octave.

Is there any particular reason not to do that? Will we break any compatibility, especially if we have external partners who insist on using MATLAB? Are there any performance penalties we can expect?

like image 704
lindelof Avatar asked Aug 20 '10 20:08

lindelof


People also ask

Why MATLAB is better than Octave?

In MATLAB, it is allowed to load the empty files. In Octave, it is not allowed to load the empty files. 7. It does not support C-style auto-increment and assignment operators i.e x++, ++x, etc.

Can I use MATLAB instead of Octave?

Some of the differences that do exist between Octave and MATLAB can be worked around using "user preference variables." GNU Octave is mostly compatible with MATLAB. However, Octave's parser allows some (often very useful) syntax that MATLAB's does not, so programs written for Octave might not run in MATLAB.

Is Octave good for machine learning?

Experimenting With ML in OctaveOctave is a great language for prototyping and experimenting with ML algorithms, as it has built-in support for numerical linear algebra such as matrix and vector calculations.


3 Answers

In 2008 I tried doing the same thing. I quickly noticed the following show stoppers:

  • Toolboxes are not as complete and not as well tested. Particularly the image processing toolbox that my work relied heavily upon (the big show stopper was that imtransform was not implemented).
  • The Octave debugger and profiler were primitive compared to Matlab's.
  • If you work with others, it may be very difficult to get them to change.
  • If you use third party toolboxes, you are on your own getting them to work.
  • Octave's plots are not publication quality.

But I have to say that I was generally impressed at how compatible Octave is with Matlab, if your use of Matlab is basic, you may get lucky. Finally this was in 2008, in two years things can change a lot.

like image 198
carlosdc Avatar answered Oct 20 '22 11:10

carlosdc


Just off the top of my head:

  1. There are many toolboxes that Octave does not have, as I discovered when I tried to do homework in a Machine Learning course two semesters ago.
  2. Octave has a much inferior debugger. It was almost impossible to work with.
  3. Matlab is much faster for many types of operations.
  4. Matlab's plots are a lot nicer.
  5. Octave doesn't have a native GUI. There are GUIs for Octave, but they are inferior to Matlab's native one.
like image 23
Nathan Fellman Avatar answered Oct 20 '22 12:10

Nathan Fellman


I've tested octave and R too.

Regarding octave: I was very impressed with the similarity of octave syntax. It didn't take me much time to transport my MATLAB scripts to octave. Meanwihile I have a particular problem on printing markers jointly with errorbar wich was fixed by Jarno Rajahalme at nabble and to change the xtick font size, which workaround I got in a question response at nabble. So it still have some bugs which with some effort can be overcome. If you experience some problems you may try nabble mailing forum: [email protected]. By the way my team cannot adapt (user friendly) to it such as they adapt to MATLAB, so we're still using MATLAB. Since MATLAB is built under gnuplot, another way to correct its bugs is editing the generated gnuplot file. The best IDE I found to it was QtOctave, that I made a short review in "Remember Blog".

Regarding R: according to a research made by SciViews, R's performance is superior to MATLAB and octave. I don't have much experience with R. I studied mclust package to wrote a wikibook chapter about EM Clustering in R. By the way, they seem to have a very active community. So you may find third party packages to proposals, which are not IMO so standardized. The best IDE I found was StatET plugin for eclipse, JGR (Java GUI for R) and emacs. Despite the time cost to learn a new programming language, if I would choose an open source platform to make my experiment graphics and some data mining analysis I would try R.

like image 32
Emanuel Vianna Avatar answered Oct 20 '22 13:10

Emanuel Vianna