The big argument: Is Matlab better than Python?

Which do you prefer?


Yes: Matlab is better, argues Ellen Jolley

while people still think Python is better than Matlab

Whoever said that the best things in life are free had clearly never tried scientific computing.

I have tried coding with Python, and I really wanted it to work out, but everything I wanted to do was always harder in Python than Matlab. Why are vectors called lists? What exactly was unexpected about my indent? Good for you if you are over these conceptual humps but personally I have neither the time nor the interest. I like my coding languages to meet me where I’m at and Matlab does just that.

Learning vector and matrix manipulation in Matlab is an effortless task for a
mathematician—it is effectively written in code just as it is on paper. Not in
Python. Import this, import that, import who, import what?! I just want an easy
life where machines understand what I tell them without me having to do
anything, is that so much to ask?

If you like Python, then truly I am happy for you, and I hope you enjoy all your
fancy jobs and feeling clever by pretending to find counting from zero easier
than counting from one. Oh, and if you’re about to tell me I’ll never get a job if I don’t learn Python… well, I did, with MathWorks, so how do you like that?


No: Python is better, argues Madeleine Hall

for people who think Matlab is better than Python:

    There are so many reasons why Python is better than Matlab: [it’s open-source, it has named arguments, it doesn’t think everything is a matrix, …]. As well as all of these obvious ones…

    reasons.append(Python is not just simply a scripting language for mathematics. It’s also an imperative and functional language which people can use for anything and everything—from crawling web servers, to controlling external devices, to making UIs. Fun fact: the original Google algorithm was written in Python.)

    reasons.append(It indexes from zero which is obviously correct since zero is CLEARLY the first integer.)

    reasons.append(I don’t need to LITTER my functions or loops with silly little end statements.)

    reasons.append(It’s named after Monty Python which is way more fun than Matlab which is named after `Matrix Laboratory’ (BORING).)

    And finally, reasons.append(Python doesn’t give me traumatic flashbacks to my PhD research.)

Ellen is a PhD student at UCL studying fluid mechanics. She specialises in the flow around droplets and ice particles.

Madeleine Hall is a mathematical consultant at the Smith Institute, based in Oxford. She likes writing, open water swimming, the Oxford comma, and tHiS mEmE. Her PhD research was on optimal swimming for microorganisms. She has found none of her results of any use in the lido.

More from Chalkdust