6 ms·
Matlab and Python address different problem domains, as the article explains and I think anyone in a technical career would be well advised to know a scripting
by zwieback 15y ago
Matlab and Python address different problem domains, as the article explains and I think anyone in a technical career would be well advised to know a scripting language. Whether Python is better than others is hard to say and the article doesn't really explain why Ruby or Perl couldn't be used.
I've looked at a bunch of students' resumes lately - every single one listed Matlab as one of the languages they know. Not seeing a lot of Python in the resumes I'm reviewing, which are mostly EE students. I think Matlab is becoming the de-facto standard for numerical analysis and there are some nice toolboxes.
Coming from a traditional SW background I find some of the Matlab syntax alien but fundamentally it's a great product.
- gammarator 15y agoRuby or Perl are certainly good options, although some of Perl's syntax can by off-putting to the beginner, IMO. Right now, there is much better library support for astronomers in the Python ecosystem, though.
- SriniK 15y agoThis is also one more important feature/pain author didn't capture. Python is designed with scientific calc in mind. Floats are represented as pure floats like C or C++ way. python >>> 2 * 3.1 6.2000000000000002 perl -e "print 2 * 3.1" 6.2 ruby -e "print 2 * 3.1" 6.2
- dexen 15y agoThat's a good point, but it may be a superficial difference, actually. The final output is not necessarily direct representation of value of variable, but may be rounded up by default for easier use. Rounded up in a configurable way. For example, in MATLAB, Octave and JavaScript, a value is displayed (formatted) as an `integer' if it's very close to an integer (closer than certain epsilon -- and that's configurable in case of M & O). At all the time, what the variable holds -- and what undergoes computations -- is a purely float value, never an integer.
- duke_sam 15y ago>>> from decimal import Decimal >>> 2 * Decimal("3.1") Decimal('6.2')