I recently have been considering switching to the Python programming language. Currently, Matlab is the language of choice in my department for rapid development and prototyping of code. Itâ€™s very good at this, but Mathworks (the company who produces Matlab) have been tinkering with the licencing terms, leading to hassles where none should exist.

I have found python+numpy+scipy+matplotlib+IPython+[random sci/numerical packages] to be almost a complete replacement for matlab. There are certainly some packages missing, so if there is a specialized set of tools that are available in matlab but not in python, this might be an issue, but otherwise, I haven't looked back.

I'll mention a couple of distinct advantages of python over matlab

- True programming language instead of a hack of a language thrown over a numerical package (numpy came to python instead of the other way around). Managing large python projects is a complete joy vs matlab. How many different oop systems have been mangled into matlab?
- Totally free and portable. I can use python on just about any machine without licensing issues. This is the biggest advantage from my perspective.
- Wrapping other libraries in C,C++, Fortran is fairly straightforward using SWIG, Cython,f2py,etc vs the ugliness that is a mex file
- Cython for accelerating slow code (although I find that numpy is nearly as fast if not faster than matlab)
- mpi4py vs some other package that I have to buy from matlab to run parallel applications

Personally I use the Enthought Python Distribution for a lot of my work, because it packages everything and is free for individuals in academia. I've alternatively built python and all of its libraries and modules from scratch. Module management is perhaps the largest weakness in python, but there are some nice things to help out like `virtualenv`

and `pip`

Licensed under: CC-BY-SA with attribution

Not affiliated with: Stack Overflow