tags:

views:

252

answers:

7

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?

+8  A: 

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.
Nathan Fellman
+3  A: 

You should definitely prefer Matlab to Octave if you can afford it.

I have not had much experience with Octave, but I would expect issues if your code is using Matlab toolboxes, fancy plots, or Matlab gui.

I would expect it to be like OpenOffice vs. MS Office. Mostly compatible, but just different enough to give you a headache.

Dima
+9  A: 

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, your 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.

carlosdc
+2  A: 

Octave doesn't have guide, which makes building GUIs super easy. I regularly use guide for making tools for my non-MATLAB using colleagues.

Doresoom
Does Octave have a guide equivalent? Is that why I got downvoted?
Doresoom
+1  A: 

It's interesting to see how the open source alternative works for statistics but not for numerical analysis. R (the octave of statistics) is nowadays much popular than the commercial S-plus (the matlab of statistics). The issues mentioned as reasons not to switch away from matlab found in the other answers were also applicable to R. But still everybody just started contributing and now R is the standard, with better graphics, better packages and no more vendor lock-in.

So you could prefer octave over matlab as well, if you can step over the prisoners dilemma.

DiggyF
You should have put this into a comment, not an answer.
Dima
+4  A: 

I've tested octave and R too.

Regarding octave: I was very impressed with the similarity of octave syntax. It doesn't took me many time to transpose 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 overcomed. If you experiences some problems you may try nabble mailing forum: [email protected]. By the way my team cannot adapt (user friendly) to it such 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 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 seems to have a very active community. So you may found third party packages to infinite 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.

Emanuel Vianna
+2  A: 

There's a good WikiBook on MATLAB with a list of differences between MATLAB and Octave.

In my experience, core MATLAB is well ported to Octave, but the toolboxes have varying levels of compatibility, so your decision depends on what exactly you are trying to code.

Some things that Octave lacks, AFAIK, are the tight integration with .NET code and the gui builder, guide (though there are many other GUI builing tools that Octave can use).

Also, as others have pointed out, much of what you pay for with MATLAB is the slick interface and debugging/profiling tools. Experienced coders can probably manage with the alternatives, but newbies may struggle.

Richie Cotton

related questions