When I used Matlab daily, I never used the ide. The command line and editor were good.
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...
Virtually none of that is in fact unique to MATLAB or even a strength in the first place.
> 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.
True, Matlab has its limitations, but those are partly unavoidable. If you want to build a large object oriented program, you often use something more heavyweight anyway.
But that heavyweight language (or framework) is usually not so quick to build something in anymore, because your heavyweight structures are just in the way in the earlier phase.
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.
So you're implying anyone who is a software developer is not educated or intelligent, nor has a large salary. I think a lot of people would beg to differ.
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.
He wasn't implying that. You've inverted his statement. Many economists and engineers I know care less about how they code and care more about getting a solution to the model at hand--this seems to be the poster's point. The implication is exactly what he exposited, whereas the logical inverse is what you've mistakenly deduced as the implication.
Perhaps it comes off that way to you but I'd be willing to bet it doesn't to the great majority of readers, because it simply isn't saying what you say it's saying.
OK, but he's worded it wrong, it gives the impression of a snarkiness. Maybe he's saying that matlab users can't program well but are still intelligent/well paid (but that doesn't really make sense since numpy is equally easy and an intelligent/educated person wouldn't find programming hard). Anyway, maybe I misread it and you're right.
edit: great, I was getting points before, and then you come along with your italics.
It depends on what you're trying to do. There's no question that Python is a cleaner language with generally better support for general-purpose programming, but Matlab is really good for numerics, prototyping and exploratory data analysis.
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.
Comments
When I used Matlab daily, I never used the ide. The command line and editor were good.
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...
Virtually none of that is in fact unique to MATLAB or even a strength in the first place.
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. 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. Vectorising functions in Python (that is, NumPy) is about as straightforward. 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. 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.True, Matlab has its limitations, but those are partly unavoidable. If you want to build a large object oriented program, you often use something more heavyweight anyway. But that heavyweight language (or framework) is usually not so quick to build something in anymore, because your heavyweight structures are just in the way in the earlier phase.
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.
So you're implying anyone who is a software developer is not educated or intelligent, nor has a large salary. I think a lot of people would beg to differ.
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.
He wasn't implying that. You've inverted his statement. Many economists and engineers I know care less about how they code and care more about getting a solution to the model at hand--this seems to be the poster's point. The implication is exactly what he exposited, whereas the logical inverse is what you've mistakenly deduced as the implication.
His last paragraph is not clearly worded then. It comes of as thinly veiled insult to software developers.
Perhaps it comes off that way to you but I'd be willing to bet it doesn't to the great majority of readers, because it simply isn't saying what you say it's saying.
OK, but he's worded it wrong, it gives the impression of a snarkiness. Maybe he's saying that matlab users can't program well but are still intelligent/well paid (but that doesn't really make sense since numpy is equally easy and an intelligent/educated person wouldn't find programming hard). Anyway, maybe I misread it and you're right.
edit: great, I was getting points before, and then you come along with your italics.
It's all about the illiquid karma ;). No worries.
It depends on what you're trying to do. There's no question that Python is a cleaner language with generally better support for general-purpose programming, but Matlab is really good for numerics, prototyping and exploratory data analysis.
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.