7 ms·
I had some Matlab experience about 3 decades ago. What's you take in Matlab vs R as programming languages?
by pantulis 5y ago
I had some Matlab experience about 3 decades ago. What's you take in Matlab vs R as programming languages?
- em500 5y agoIf signal processing and matrix algoritms are your thing, you should (and probably would) be using Matlab. Most statisticians don't really do much of that, what they mostly do is data management and try to mold their tables in some form accepted by an existing R package (or even Stata). As far as I remember, Matlab was pretty horrible for data munging, even worse than R for anything non-numerical. But my Matlab experience is also almost 2 decades old, so I don't know if it's any better today.
- tomrod 5y agoNot the grandparent. Matlab is much simpler for matrices than R, approaching Python's numpy is ease of use (and very reminiscent of Fortran and Julia).
- yarky 5y agoI've had to translate a lot of Matlab to R in college (physics and econometrics). I rarely found an important difference between the languages besides having to transpose some matrices here and there.
- horsawlarway 5y agoMy take is that Matlab is better in basically every regard, with the exception that the same functionality will cost you a considerable amount of real world money. Having used both in a professional setting - and coming in with a fair bit of programming experience - Matlab is generally a pleasure to use. It's different where it needs to be in order to treat matrices as first class citizens, but otherwise you can apply many of the same intuitions and paradigms that you would in any other language. R on the other hand... R is a fucking disaster of inconsistency. I find myself incredibly frustrated attempting to do simple and sane things - things that I know are only a line or two in Matlab (or even python) and instead fighting with "which version of the 12 different slight variations of this operator are you attempting to use today!" hell scape. My strong guess is that if you have no coding experience, and you learn R fairly thoroughly - it will feel very nice. My problem is that for anyone with actual coding experience, it's like being given a keyboard with a qwerty layout, but which is actually using dvorak. All your intuitions are pointlessly wrong - not because they are actually problematic, but because R has decided that the A key is really on the other side of the fucking keyboard.
- edgyquant 5y agoBut isn’t the consensus that R is a better language? At least that is what the cool kids said when I went to college (I never used Matlab except maybe a handful of times.)
- horsawlarway 5y agodefine "better"? They each have a few strengths over the other, but generally speaking, I much prefer the language consistency of Matlab. My general experience is - industrial shops will be using Matlab. Almost all of my Matlab work was aerospace related (think sigint/radar/signal processing/modeling). R is more popular in education environments - but I strongly suspect that's just because it's free. Post-grads don't have much lab funding to work with at the best of times, and Matlab with an associated set of plugins/libraries specific for your task can easily run 30k a seat. Personally - I find it pretty telling that most places with money choose Matlab. Doesn't inherently make it better, but it does mean Matlab is getting used in places where mistakes are expensive, and there's a focus and consistency to the tooling that I just think is desperately lacking in R.