by wyager · 11y ago · 0 comments
I honestly can't understand why. I'm currently in a computer vision class that uses Matlab, and it's literally the worst language I've ever used in my life. The design is nonsensical, bordering on malicious
I've always thought that the biggest problem with python was that as programs get bigger, you're likely to run into some confusion due to the lack of static typing and substantial use of implicit conversion (e.g. "Truthy" and "falsy" values), but python has nothing at all on Matlab.
Just last night, a matrix I constructed using the expression "[x, y, (x+scale), (y+scale)]" inexplicably had dimensions 1x8 instead of the visually obvious 1x4, but only after a few hours of matlab slowly evaluating this expression thousands of times without any trouble. I suspect this has something to do with matlab's horrible ambiguous matrix concatenation syntax.
The answer is fairly obvious though, isn't it? For scientists or novice programmers wanting to do some numerically intensive work, Matlab has typically offered one of the quickest (in time-to-solution) prototyping platforms. One of the keys being that you can get started very quickly, with minimal setup (besides the expensive license and installation, something most academics need not worry about). As a former academic programmer and now a consultant that helps companies commercialize such prototypes, I understand your pain, but at the same time I completely understand why a physicist, imaging scientist, or finance major ends up using Matlab over something like C++ or Python. Same goes for LabView, and if you despise Matlab, I challenge you to give LabView a whirl. The gap between the Matlabs and Labviews of the world and the other programming languages is closing in terms of ease of use and setup time, but we're not there yet and also momentum shifts on this type of thing take a loooong time. If you come into a lab and are working on a research project that was started in Matlab, odds are, in the interest of finishing your thesis on time, you're unlikely to port it to another language, even if you have the skill to do so.
Corollary: if you are offered a tool highly praised for its being exceptionally easy for beginners, think about the price the tool had to pay in other departments, and how will it affect you in 6-12 months of use.
The ridiculously low entry barrier exists wrt importing data and plotting/displaying results.
There are many research institutions and workplaces where the cost of the tool isn't really thought about at all. In fact, the cost of Matlab and toolbox fees is a small fraction of a senior scientist/engineer's total compensation.
The main competitor is Python. However, using a general purpose programming language is often too hard for non-programming oriented scientists. They are not able to compile a Python package on Windows, never mind actually package and distribute their work to colleagues. On Windows, if the package isn't in one of the distributions like Anaconda, it may as well not exist.
I would say that it really is R. Python while a good choice is a fraction of the size of R and R as a domain specific language excels in its own realm.
Using R with RStudio and sticking with Hadley Wickham universe with Functional Programming makes R shine. There is a reason why so many companies invest in R.
You will never be able to use R to model a Kalman filter, calculate stresses in a beam, or simulate engine control logic.
I refer you to Matlab's toolbox list. http://www.mathworks.com/products/
Yeah that's my experience with my current job. Matlab licenses aren't an issue. Also many people have Bloomberg terminals and other expensive tools of that trade that make Matlab look fairly cheap in comparison.
For a language to beat out Matlab it will need to be based on other factors than cost. Most likely performance, documentation, training, tooling and be popular within the pool of candidates for jobs. Hopefully Julia can get there.
There are plenty of cases in which Matlab's cost is a big factor. Maybe not at your company, but some of Octave's most ardent paying customers have been those disgruntled with Matlab's price tag.
I agree with all you said mind you, and could rant even more about Matlab, just giving a possible explanation for how Matlab parses the expression.
You're going to cry if you see the current standards of undergraduate spelling, grammar, and sentence structure, btw. :)
The logic you state (which is dominant) is wrong. Optimizing the speed of writing the first version of a particular piece of code is a bad idea.
* Isn't it a good idea to publish code used to produce the results so as to help fellow scientists verify the results and methods?
2. Matlab code gets published all the time.
3. Just because it's not matlab doesn't mean that it's, for example, in a state others can use. See for example: http://reproducibility.cs.arizona.edu/v2/index.html (which isn't perfect, but it's something)