5 ms·
You know what's even easier to learn and more beginner friendly, has great debugging tools and is very powerful? MATLAB. And most engineers/scientists use it.
by cop359 15y ago
You know what's even easier to learn and more beginner friendly, has great debugging tools and is very powerful? MATLAB.
And most engineers/scientists use it.
If you know MATLAB, I don't see why you would even bother going to figure out the dozens of Python libraries available.
- thesnark 15y agoMATLAB is a bad choice for science. It is proprietary, making it difficult to share work among people who do not own a license, therefore making it more difficult to reproduce results. Not to mention the fact that the MATLAB language is extremely awkward anytime you want to work with something that isn't a matrix.
- dexen 15y agoGNU Octave [0] is mostly compatible with MATLAB. GPLed and implemented in Fortran and C++, it's pretty much hack-able to your needs. > MATLAB language is extremely awkward anytime you want to work with something that isn't a matrix. From my limited experience, that's true but rarely of relevance. You can, and want to, use matrix operations all the way. Less bugs (simplier code), faster execution. [0] http://www.gnu.org/software/octave/ http://www.gnu.org/software/octave/
- thesnark 15y agoIn my experience 90% of scientific data analysis work is: getting the data, cleaning it and transforming it into a form suitable for analysis. MATLAB fails miserably at these tasks.
- dexen 15y ago> 90% of scientific data analysis work is: (...) and transforming it into a form suitable for analysis. Is that infinite recursion or endless loop? Or is there an end to it, caused by quantum nature of work -- at some point the 90% becomes an undivisible unit? ;-) ((terribly sorry, couldn't help it)) At any rate, that sounds like you want to feed the input through a pipe of simple, programmable textual filters -- cue sed, awk etc. And then pipe into standard input of something -- I know Octave has standard input, MATLAB I wouldn't be so sure.
- zwieback 15y agoMatlab 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
- orenmazor 15y agoas somebody who spent quite a large amount of time turning the algorithms physical engineers (photonics, specifically) into something software people can use (into c# and ironpython), I'd rather they all stuck to python. I'm tired of having to spend my day translating matlab into something useful.
- b_emery 15y agoHave you ever tried to use the matlab compiler for this sort of thing? Too limiting?
- juiceandjuice 15y agoMost engineers use MATLAB. Most scientists don't. Chemistry adopts it a bit more, but if a scientist is using it, chances are they are actually solving an engineering problem or just making a plot, and not performing data analysis or simulation.
- keypusher 15y agoDunno where you got that idea. I used to work in an fMRI lab at MIT. We would put people in a brain scanner and have them do some tasks. After, we had a timeseries of very high resolution 3-D blood flow images in the brain (these are basically matrices with a number for the value in each voxel). Then we ran data analysis. I'm talking a multi-stage data analysis using different statistical techniques for motion correction, normalization, modeling the haemodynamic response function, slice timing correction and lining all this up with the time data for the tasks, then doing whole group analysis. This generally ran on a 12 node Linux cluster we had in house and typical analysis could take hours or days. Up until recently, MATLAB dominated the research in this field, but now everyone is moving to Python, or wrapping existing programs in Python. Anyway, it's not only engineers that use MATLAB. It is quite popular in the sciences, and not just for plotting.
- juiceandjuice 15y agoWell this sort of thing especially is where MATLAB shines (i.e. Matrix processing, Signal Analysis, hence MATrix LABaratory), especially with 3D FFTs like you'd do with fMRIs. So that's fine, but once you start getting into Monte Carlo simulations and massive batch processing, event filtering, instrument calibration, and all your database connections and all sorts of other stuff, it honestly just doesn't scale up or provide a complete solution. So you end up doing some in MATLAB, some in C, some bash scripts, some in whatever else. Python gives the flexibility at all stages to solve all that in one or two languages (C/C++ for optimization, python for everything else). I do know chemists that use MATLAB, but not the computational chemists on the big clusters. Most the solid state physicists I know use OriginLab, LabView and even Maple or Mathematica all on Windows and proprietary stuff like that, usually because they are hooking up to various instruments. Even R has been more popular with the physicists I know than MATLAB. Maybe this is all just a big anecdote, but I also work in scientific computing as well, and this has been my experience.
- splat 15y agoSpeaking as a grad student in astronomy, I tried using MATLAB for a little while but it occupied an awkward middle ground for me. It was a bit too high-level for the lower-level things that python is useful for (e.g. grabbing images off of a survey's servers or writing a script to align a spectroscopic mask), but it was a bit too low-level to compete with the things Mathematica is good at (e.g. symbolic integration, carrying units through equations). One major advantage python has over MATLAB that the author mentioned but didn't really emphasize is that python packages exist to interface with IRAF. Pretty much every astronomer who has to touch data uses IRAF to reduce the data and I can tell you from personal experience that IRAF is a horrible piece of software to work with directly. The python interface makes it much more tolerable, but I don't think there exists a comparable MATLAB version. Without a MATLAB interface to IRAF, python beats MATLAB for astronomical purposes hands down.
- d0mine 15y agoBye Matlab, hello Python, thanks Sage https://vnoel.wordpress.com/2008/05/03/bye-matlab-hello-python-thanks-sage/ https://vnoel.wordpress.com/2008/05/03/bye-matlab-hello-pyth... 10 Reasons Python Rocks for Research (And a Few Reasons it Doesn’t) http://www.stat.washington.edu/~hoytak/blog/whypython.html http://www.stat.washington.edu/~hoytak/blog/whypython.html Should i switch to Python? http://stackoverflow.com/questions/5063037/should-i-switch-to-python-closed http://stackoverflow.com/questions/5063037/should-i-switch-t...
- keypusher 15y agoMany, many labs are migrating their MATLAB code to Python these days. This is no accident. My last job (academic research) I was a full time MATLAB coder, and I can say that MATLAB has many problems of its own. It has a decent all in-one IDE/REPL that makes it easy to get started and do off the cuff work. It has very well optimized matrix operations, you can cook up some decent scripts and it has some nice toolboxes, but for anything larger it very quickly becomes a huge mess. Try maintaining and updating a 100k+ loc MATLAB script with others. Or writing a GUI. It's not pretty. MATLAB might not quite deserve the terrible reputation it has within the larger software community, but I would never go back, and can testify that there is a massive and rapid migration among the scientific community away from MATLAB into Python going on right now.
- ignifero 15y agoYou mean I have to install and licence it on every system that i use? No thanks, i prefer python that I can use everywhere, even in remote clusters overseas. FYI Numpy + Matplotlib have a very intuitive syntax for matlab users. http://mathesaurus.sourceforge.net/matlab-numpy.html http://mathesaurus.sourceforge.net/matlab-numpy.html