open-discussion
open-discussion > RE: Octave vs Matlab vs Pythonfor Neuroimaging research
Sep 18, 2018 02:09 PM | Troy Smith - University of North Georgia
RE: Octave vs Matlab vs Pythonfor Neuroimaging research
I am a former Matlab user who has migrated to Python whenever
possible, so I guess you could call me a Python enthusiast. I
agree that there are a few downsides to Python, but I think these
are vastly outweighed by the advantages. With regard to the
points raised by Arnaud Delorme:
Best,
Troy
- Yes, getting used to 0-based indexing is not intuitive and can be challenging. This is probably one of the most difficult aspects of Python for non-programmers and novices. However, the fact that vectors/arrays are 0-based makes the code much easier to write and read, particularly when slicing.
- I agree that indenting has issues, particularly when copying and pasting. However, it also makes reading and troubleshooting much, much easier. That's one reason I was taught even in my C++ and Matlab training to use indentation. The fact that Python forces you to indent has saved me from myself more times than I can count.
- For interactive programming Matlab-style with Python, check out Spyder (https://www.spyder-ide.org/)
- Yes, Python sometimes requires users to understand basic object-oriented concepts but these are not very difficult ones. IMHO, learning a few concepts is a small price to pay compared to the annual licensing fee for Matlab.
- Library installation in Python is extremely easy if you use any of the common packages such as Anaconda or Enthought. On the other hand, I've had quite a few difficulties getting the path correct for external Matlab functions and packages.
- Python 3 has been out for for almost 10 years now. All the major libraries, including numpy/scipy have been updated. If a novice programmer focuses on using Python 3 and ignores Python 2.7, they shouldn't run into any of those issues. (Of course, it's likely that a number of labs still are using old code that may not be up-to-date, so this could be a problem for some.)
Best,
Troy
Threaded View
| Title | Author | Date |
|---|---|---|
| Arnaud Delorme | Sep 10, 2018 | |
| Matthew Brett | Sep 10, 2018 | |
| Arnaud Delorme | Sep 17, 2018 | |
| Troy Smith | Sep 18, 2018 | |
| Matthew Brett | Sep 18, 2018 | |
