Matlab is awesome above all else because the design is coherent. Both the syntax and the standard libraries.
It is extremely quick to whip up anything and then turn that into a script and then into a software with functions (since functions can return many variables, and they also have zero overhead, you don't need any includes or requires, you just call them). Type conversions are practically never a problem, since they are sane and automatic. None of this 1+1.5 giving syntax error. Real booleans. Data input and output libraries just simply work like you would expect them to. ( A=imread('/home/gravityloss/abc.png') creates a width x height x 3 matrix with all the rgb values. No requires, includes, plugins, hunting and compiling libraries.). You don't need libraries to do a huge amount of stuff, but if you need them for something experimental, they work extremely easily.
You also rarely need stuff like loops since mass operations on data are native. If you as a newbie create a custom function for a scalar, there's good chance it will work for vectors or n-matrices automatically. This reduces the amount of error-prone housekeeping code for indices and lengths immensely. It's also much much faster than some looping in another scripting language. As a result, the code is often very readable as well.
There's help which actually returns something sensible when you type help, you can type help help or help command or search this or that, the help texts are actually very thoughtful and helpful too and not at all like Linux man pages... I could go on for hours on features that don't really exist anywhere else, even though everything's been in plain sight for decades in Matlab.
Julia's an awesome thing though, I hope it gets more traction...
> Matlab is awesome above all else because the design is
> coherent. Both the syntax and the standard libraries.
It certainly is coherent, and also consistent, but only in the weakest and least interesting sense. Namely, everything's about equally messy. Namespaces are non-existent in the standard library and clumsily realised otherwise. OOP remains rudimentary and feels as tacked-on as it happens to be. The one-function-per-file system ruins everyone's day. No standard arguments (and checking nargin loses its appeal rather fast), and shitty inlined pseudo-lambdas. > It is extremely quick to whip up anything and then turn
> that into a script and then into a software with
> functions
No different from R or Python, and most of the time a genuine weakness; it's a key reason for scientific/engineering code being as ad hoc and convoluted as it is. > If you as a newbie create a custom function for a
> scalar, there's good chance it will work for vectors or
> n-matrices automatically.
Vectorising functions in Python (that is, NumPy) is about as straightforward. > It's also much much faster than some looping in another
> scripting language.
Nah, MATLAB is now fairly good at unrolling and optimising such loops. Don't worry too much about vectorising every single bit of your algorithm. > There's help which actually returns something sensible
> when you type help
That's also true in the cases of both Python and R. Long story short: Most of your perceived advantages aren't unique, and that comes on top of MATLAB's exorbitant pricing schemes and extremely dubious language design. Trust me, if you think MATLAB's a particularly well-designed language for anything other than linear algebra, you owe it to yourself to check out alternatives and other languages.I tried Python and Numpy, and the vectors, matrices and all that felt just tacked on and the syntax was much more complex compared to Matlab. Maybe it's changed since. Also in Scilab the type conversions and function overhead are a nuisance. Every time you edit a script or function, you have to specifically reload it before running it. Makes rapid prototyping about three fold as time consuming. Would it be hard to make the software notice I actually edited something?
Many people actually want to solve problems, and they just end up creating a program as a side product. They do not set out to study libraries and do not want to actually write any code that is not directly related to the problem they are solving.
It's why Matlab is able to charge the price. It sometimes saves time. Some of the users are not primarily software developers but are quite educated and intelligent and their salary is not small.
In reality, matlab only exists because of inertia. It's the same reason why microsoft windows is still around. There's no substance behind it.
edit: great, I was getting points before, and then you come along with your italics.
It's also worth saying that Matlab graphics are really convenient and powerful. Last time I used matplotlib, I was very disappointed with the lack of many plot types and finickiness.
One other example is the parfor (Matlab's support for multithreaded computation in embarrassingly parallel computations like map/reduce and cross-validation). Classic Matlab -- simple, not totally orthogonal, gets you 80% of the way there without fuss. (I don't know whether to hate this tendency or love it.)
There's a reason it's so widely used, and it's not because people have not shopped around.
Python is better generally than matlab/octave, and R I view as roughly on par.
*Source: 7 year veteran, octave and matlab user, python lover