4 ms·
>> For anyone looking for a "better MATLAB", Python has NumPy, SciPy and Matplotlib which are pretty much everything. I hear this at work all the time, "just u
by w0utert 14y ago
>> For anyone looking for a "better MATLAB", Python has NumPy, SciPy and Matplotlib which are pretty much everything.
I hear this at work all the time, "just use Python, we're going to use Python everywhere we use Matlab from now on". It simply doesn't work like that.
Usually it's programmers who are too overly enthusiastic about replacing Matlab with Python, because they are comfortable with all aspects of programming languages. The people typically writing the most complex Matlab code aren't, more often than not they are physicists or mathematicians. Python + SciPy + Matplotlib is not nearly as accessible as Matlab, and you drag in all kinds of typical 'software engineering' problems that don't exist when you stay inside the Matlab IDE and its related tools. I can conjure up a plot in Matlab and manipulate it incrementally for example, while Matplotlib often requires a lot of crazy data mangling and setup code that isn't required in Matlab (trust me, I've spent months re-implementing a library of Matlab plotting scripts in Matplotlib, and the code of some of them is completely untraceable to the original Matlab code, and full of stuff completely unrelated to plotting). Also, lots of Matlab code relies on all the crazy implicit operations and type juggling allowed by Matlab, many of which are almost fundamentally incompatible with a well-defined programming language suited for production code.
This is all even ignoring the fact that Matlab comes with a pretty extensive library of toolboxes that have no equivalent in SciPy or Numpy. If you're really determined and know how to program in Python, you can basically get a lot of stuff done without requiring Matlab, but if you've always been using Matlab like a prototyping tool or a very elaborate graphical calculator (and this constitutes a very extensive part of Matlab users), Python + all its scientific libraries is no substitute.
- jstanley 14y agoGood points, and that provides some perspective I hadn't considered. However, I still think my points about where MATLAB falls down are valid. There is no reason for it not to have lexical scoping, or warnings about when you are doing stupid things. It just doesn't have them, and it causes frustrations like the one in this article.
- w0utert 14y agoOh totally agree, Matlab-the-language is terrible, and Python is a million times nicer to work with. My comment was only about the suitability of Pyhton + Numpy + SciPy + Matplotlib as a Matlab replacement for non-programmers.
- anonymouz 14y agoOctave would be a closer equivalent of Matlab, but is also terribly lacking in features compared to Matlab. And despite not being a fan of closed source software in general, I must say that Matlabs "IDE" is hugely convenient and, for its purpose, far ahead of anything else out there.