r/Python • • Aug 05 '19

Python's response to MATLAB

Post image
4.3k Upvotes

372 comments sorted by

View all comments

Show parent comments

10

u/[deleted] Aug 05 '19

Also a young PhD student here. Consider using one of the Python IDEs, they're like MATLABs gui interface which should help you get started. Spyder, like one of the other commenters have said is recommended as it has a sort of similar interface to MATLAB and is built for scientific coding. Once you know Python well enough, you can consider using text editors like Visual studio code which is more lightweight and looks nicer which helps you code better imo.

MATLAB lets you run MATLAB scripts via python so you can exploit that for your work flow although I wouldn't rely on this too much as its quite slow if you don't have an SSD as it calls the entire MATLAB engine. Nevertheless it's possible. Additionally from a brief Google search I just did now, you can convert your MATLAB code to python.

As an anecdote, the reason why I moved to Python was because MATLABs interface was too clunky and the colour scheme was horrible. The green comment colour is difficult to see against a white background, there's no dark mode and you can't adjust the window size.

At the moment I'm using Atom, a text editor and I'm able to change my theme according to how I like it, I'm able to commit to github easily, I have a folder tree on my left that I can hide at will, I have a mini map of code on my right so I can see which bits of code I need to go to and I have a spell checker and linter to check through my code. If I want less/more features I can uninstall and install them within the app. It might be silly to say but being able to code with the correct color scheme has helped my coding and my eyes greatly.

1

u/ChemistBuzzLightyear Aug 06 '19

Not that it matters because you have already switched, but the color scheme is easily changed. All you have to do is look in the settings and change it. There is also integration with git, folder tree, etc.

I want to switch to python fully, but nobody else in my lab uses it and we all write code to be shared. :/

1

u/Antouziast Aug 05 '19

I agree, a comfortable environment is important in my eyes too. I've played with Atom + Hydrogen as well and it's nice to start writing one's first scripts!

1

u/[deleted] Aug 05 '19

Second everything here.

My transition from Matlab was greatly enhanced by Enthought Canopy. I don't use it anymore, but at the time it was wonderful.