Live data from Hacker News

Matlab is oversold as a general-purpose language

abandonmatlab.wordpress.com

41–50 of 104 posts

Re: Matlab is oversold as a general-purpose language

#41

Earlier quoted context omitted.

I've been working with Matlab for years and have been quite intrigued by claims that SciPy is the new, better, Matlab. But every time I tried it, it felt like a cheap knockoff. For example, let's say I want to apply DCT to a matrix. In Matlab it's simply dct(A). How do you do that in Python? Well, there's scipy.fftpack.dct, but when I try it, it turns out it operates on the rows of A, instead of the columns. So I sta…

So, basically, you're panning the massive open collaborative effort behind SciPy/NumPy/Pandas because you can't be bothered to learn a slightly different and more flexible syntax? Because that's what it sounds like.

No it runs deeper than that. In my experience Matlab is used by people who are not programmers and don't aspire to be them. Ever. They want to easily prototype ideas and have zero interest in the machinery that makes it run.

Scipy/Numpy/Pandas are, at the moment, not the comprehensive, well documented and consistent platform that Matlab is. Simple things like a less than painless install process and numpy examples like "a*b" can be element wise multiplication or matrix multiplication pending if "a" is array or matrix are enough to put of my coworkers off for at least a year or two before contemplating a switch again.

Re: Matlab is oversold as a general-purpose language

#42
post #8

For something to be oversold... it has to be sold as something in the first place. I work at a company which uses Matlab extensively. I don't think anyone here views Matlab as a general-purpose language, even though you can put together some fairly fancy things in it. What we do view Matlab as is an exceptional domain-specific matrix manipulation and data visualization language. The IDE is exceptionally easy to use,…

I've been working with Matlab for years and have been quite intrigued by claims that SciPy is the new, better, Matlab. But every time I tried it, it felt like a cheap knockoff. For example, let's say I want to apply DCT to a matrix. In Matlab it's simply dct(A). How do you do that in Python? Well, there's scipy.fftpack.dct, but when I try it, it turns out it operates on the rows of A, instead of the columns. So I sta…

SciPy's description could have been better. However, if Python/SciPy feels like a cheap knockoff, it's entirely your fault. By that logic, SciPy is also a cheap knockoff of BASIC, C#, R, Tcl, etc. "NumPy and SciPy were created to do numerical and scientific computing in the most natural way with Python, not to be MATLAB® clones." [1]

SciPy's DCT is meant for multidimensional arrays. Array indexing begins at 0 in Python, just like it does in many other languages. So, it's only natural that they'd count axis numbers that way too.

> do I really want to go through all this every time I want to accomplish a simple task?

Entirely your choice. Your choice is not a reflection on the quality of the product.

[1] http://wiki.scipy.org/NumPy_for_Matlab_Users

Re: Matlab is oversold as a general-purpose language

#43
post #23

Earlier quoted context omitted.

We don't use simulink or anything like that - we just use the typical linear algebra stuff: Markov chains, finding eigenvalues, solving linear systems, etc.

try python. it is much more powerful in almost every sense. And it is not easy to write crappy code in python.

Last I looked, vector and matrix handling was extremely clunky and tacked on in Python.

Re: Matlab is oversold as a general-purpose language

#44
Julia seems like an easy transition for any Matlab programmer. The syntax is very similar and the built-in package manager makes finding new libraries way easier. And apart from that, performance is awesome.

If having an IDE is an issue, Julia also has one (http://forio.com/julia/index) which looks a lot like Matlab.

Re: Matlab is oversold as a general-purpose language

#45

The author is totally biased, but that doesn't mean he is wrong. If the bias offends you, you aren't the target audience. I personally have experienced several of the things he rants about, so I know his pain and now as a policy refuse to produce additional IP in that ecosystem. When friends ask me for help, I now send them a python script. The rage doesn't really come from MATLAB (every language has warts); the rage…

I have seen some horrible shit. Terrible, awful, fucked up stupid undocumented code. I have worked in psychophysics shops (go figure). What makes you think it would be any better had they not used MATLAB? I actually like MATLAB. It really excels when used as a glorified calculator and you can plug lots of things into it and have it 'just work' without much fuss. When I worked in a tutoring lab sometimes it was cool t…

Back in the day when I was in a psychophysics lab as an undergrad I managed to take the entire mac I was working on (system 7 I think) with my supervisor's crappy psychophysics experiement code. Fortunately one of the uni sysadmins was there cracking passwords on the uni network from the HP-UX cluster and restored it for me PDQ.

Re: Matlab is oversold as a general-purpose language

#46
post #23

Earlier quoted context omitted.

We don't use simulink or anything like that - we just use the typical linear algebra stuff: Markov chains, finding eigenvalues, solving linear systems, etc.

try python. it is much more powerful in almost every sense. And it is not easy to write crappy code in python.

I've seen abominable code written in python from academics.

Re: Matlab is oversold as a general-purpose language

#47
It's strange there're no single comment about Octave — http://www.gnu.org/software/octave/

It's free software and the language is 99% compatible with Matlab.

Edit: and yes, Matlab is not intended for any generalisation/abstraction. It's a big scientific calculator with REPL. And complicated program in it still feels like big calculator

Re: Matlab is oversold as a general-purpose language

#48
post #47

It's strange there're no single comment about Octave — http://www.gnu.org/software/octave/ It's free software and the language is 99% compatible with Matlab. Edit: and yes, Matlab is not intended for any generalisation/abstraction. It's a big scientific calculator with REPL. And complicated program in it still feels like big calculator

[deleted]

Re: Matlab is oversold as a general-purpose language

#49
post #9

Okay, I'll bite on this one. I used matlab quite extensively (for years) in the medical imaging field, as well as other miscellaneous engineering (read: electronics, modeling, FEA. Not web apps) disciplines. I noticed several things about the matlab culture: - In academia, people really do not seem to give a fuck about using the right tool for the job. I used to try to explain to the people in my lab why their softwa…

I could not agree more with every word you have written here.

I would like to add that scientists are neither averse to change, nor too lazy to learn new tools. However, they typically only care about the solution to their problem, not about programming in general. It is thus futile to try to convince them to use a different tool from a programmers' point of view--you need to convince them by showing them how much simpler they can solve their problems.

We are right now in the process of switching the introductory programming courses at our university from C to Python and I very much hope that we will be able to phase out Matlab as the default choice for the intermediate courses in the coming years.

Re: Matlab is oversold as a general-purpose language

#50

The author is totally biased, but that doesn't mean he is wrong. If the bias offends you, you aren't the target audience. I personally have experienced several of the things he rants about, so I know his pain and now as a policy refuse to produce additional IP in that ecosystem. When friends ask me for help, I now send them a python script. The rage doesn't really come from MATLAB (every language has warts); the rage…

I have seen some horrible shit. Terrible, awful, fucked up stupid undocumented code. I have worked in psychophysics shops (go figure). What makes you think it would be any better had they not used MATLAB? I actually like MATLAB. It really excels when used as a glorified calculator and you can plug lots of things into it and have it 'just work' without much fuss. When I worked in a tutoring lab sometimes it was cool t…

One of the problems with Matlab is that it does not encourage any sort of partitioning scheme for code. It even makes the simplest form of partitioning (functions) excruciatingly frustrating by requiring them to live in their own files--thank god there are subfunctions, nested functions and anonymous functions.

But there is still no notion whatsoever of namespacing, modules or a usable class hierarchy. It is thus very hard to organize code in a modular manner. Matlab actively encourages globally-scoped script files and long long functions. This makes constructing medium to large sized systems very painful and error prone.

TL;DR Matlab is fine for a single script or two. But anything larger than that is immensely complicated by it's lack of code organization.

Post reply on HN