Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I'm currently taking a machine learning course for fun, and the course heavily focuses on Matlab/Octave to write the code. One thing mentioned in the course is that, while Matlab/Octave are great for prototyping, they're very rarely used for production algorithms. Instead, those algorithms are typically rewritten in C++/Python/etc., using appropriate libraries, before reaching customers.

Fair enough; I get that. But here's my question: is that done for cultural reasons, for technical reasons, or because there is really no language that provides Matlab/Octave-like fluidity, but in a compiled form that can be linked from C/C++/$MainstreamLanguage? The game industry uses Lua for game logic because it's easy to embed, and vastly superior for expressing things like AI. Likewise, there are Prolog variants for rules-heavy applications, Scheme variants for compilers, and so on.

If there's a matrix equivalent language, what is it? If there isn't, why is this field different?

share|improve this question
Try JULIA. There aren't much takers for it right now. Haskell is based on lambda calculus. Since scientific computing is considered more with huge volume of data, parallel computing, heavy number-crunching and are quite different from mainstream, there isn't any defacto standard. R is now the default candidate for statistical analysis. – Ubermensch Oct 3 '12 at 8:29

1 Answer 1

up vote 5 down vote accepted

MATLAB tends not to find its way into production code for several reasons. Among these:

  • It's proprietary
  • It's old and hasn't aged well as a language
  • It was traditionally difficult to to embed in other applications

Points 1 and 3 aren't so much true today, since we've got Octave and there are many ways to interface MATLAB with external programs, but these are still the perceived drawbacks. Point 2 is definitely valid though today. MATLAB is great when what you're trying to do decomposes nicely into matrix operations, but when you talk about data structure manipulations and complicated logic, MATLAB really begins to be vexing and SLOW. OOP remains a huge pain in MATLAB and for being a research language, it lacks a lot of the constructs researchers have come to enjoy, such as functional features. It might be more informative to ask why people still use MATLAB in spite of it cruftiness, and the answer would be the easy syntax, the very well integrated IDE, the massive number of freely available domain-specific toolboxes out there, and the fact that it still absolutely rocks for making plots.

But in my experience, Python is rapidly supplanting MATLAB in the research world. As a language, it is much nicer to work with. Numpy and SciPy are in many ways more modern and advanced than MATLAB's basic library, readily generalizing matrix operations to arbitrary dimensionality. Every field seems to have its Python evangelists, working hard to create packages that match up to MATLAB's vast toolbox library. And Python has the huge advantage of being free, easy to install, and easy to use.

share|improve this answer
Agree with the Python comment. Python+R is surely making inroads into MATLAB,SAS and other proprietary products – Ubermensch Oct 3 '12 at 8:30

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.