5 ms·
Many use Matlab because of its amazing IDE, a great collection of toolboxes and remarkable speed, not so much because of its language features. Last I checked O
by pav3l 14y ago
Many use Matlab because of its amazing IDE, a great collection of toolboxes and remarkable speed, not so much because of its language features. Last I checked Octave was still missing all of that. If you can afford it, Matlab is usually well worth paying for. If not, other alternatives (Python, R) are much better in my opinion.
- tomrod 14y agoIDE: QtOctave Toolboxes: Exceeds those of Matlab (http://octave.sourceforge.net/packages.php http://octave.sourceforge.net/packages.php) Speed: On par or better than Matlab generally, unless you use compile your Matlab with MEX (but then, Octave interfaces with C and Fortran for even more speedup). Python is better generally than matlab/octave, and R I view as roughly on par. *Source: 7 year veteran, octave and matlab user, python lover
- StefanKarpinski 14y agoThe claim that Octave is as fast or faster than Matlab is simply absurd and untrue. Octave is consistently the slowest language on all of our benchmarks, often by orders of magnitude [http://julialang.org/ http://julialang.org/], even on heavily vectorized code.
- Gravityloss 14y agoWhen I used Matlab daily, I never used the ide. The command line and editor were good. Matlab is awesome above all else because the design is coherent. Both the syntax and the standard libraries. It is extremely quick to whip up anything and then turn that into a script and then into a software with functions (since functions can return many variables, and they also have zero overhead, you don't need any includes or requires, you just call them). Type conversions are practically never a problem, since they are sane and automatic. None of this 1+1.5 giving syntax error. Real booleans. Data input and output libraries just simply work like you would expect them to. ( A=imread('/home/gravityloss/abc.png') creates a width x height x 3 matrix with all the rgb values. No requires, includes, plugins, hunting and compiling libraries.). You don't need libraries to do a huge amount of stuff, but if you need them for something experimental, they work extremely easily. You also rarely need stuff like loops since mass operations on data are native. If you as a newbie create a custom function for a scalar, there's good chance it will work for vectors or n-matrices automatically. This reduces the amount of error-prone housekeeping code for indices and lengths immensely. It's also much much faster than some looping in another scripting language. As a result, the code is often very readable as well. There's help which actually returns something sensible when you type help, you can type help help or help command or search this or that, the help texts are actually very thoughtful and helpful too and not at all like Linux man pages... I could go on for hours on features that don't really exist anywhere else, even though everything's been in plain sight for decades in Matlab. Julia's an awesome thing though, I hope it gets more traction...
- apl 14y agoVirtually none of that is in fact unique to MATLAB or even a strength in the first place. > Matlab is awesome above all else because the design is > coherent. Both the syntax and the standard libraries. It certainly is coherent, and also consistent, but only in the weakest and least interesting sense. Namely, everything's about equally messy. Namespaces are non-existent in the standard library and clumsily realised otherwise. OOP remains rudimentary and feels as tacked-on as it happens to be. The one-function-per-file system ruins everyone's day. No standard arguments (and checking nargin loses its appeal rather fast), and shitty inlined pseudo-lambdas. > It is extremely quick to whip up anything and then turn > that into a script and then into a software with > functions No different from R or Python, and most of the time a genuine weakness; it's a key reason for scientific/engineering code being as ad hoc and convoluted as it is. > If you as a newbie create a custom function for a > scalar, there's good chance it will work for vectors or > n-matrices automatically. Vectorising functions in Python (that is, NumPy) is about as straightforward. > It's also much much faster than some looping in another > scripting language. Nah, MATLAB is now fairly good at unrolling and optimising such loops. Don't worry too much about vectorising every single bit of your algorithm. > There's help which actually returns something sensible > when you type help That's also true in the cases of both Python and R. Long story short: Most of your perceived advantages aren't unique, and that comes on top of MATLAB's exorbitant pricing schemes and extremely dubious language design. Trust me, if you think MATLAB's a particularly well-designed language for anything other than linear algebra, you owe it to yourself to check out alternatives and other languages.
- Gravityloss 14y agoTrue, Matlab has its limitations, but those are partly unavoidable. If you want to build a large object oriented program, you often use something more heavyweight anyway. But that heavyweight language (or framework) is usually not so quick to build something in anymore, because your heavyweight structures are just in the way in the earlier phase. I tried Python and Numpy, and the vectors, matrices and all that felt just tacked on and the syntax was much more complex compared to Matlab. Maybe it's changed since. Also in Scilab the type conversions and function overhead are a nuisance. Every time you edit a script or function, you have to specifically reload it before running it. Makes rapid prototyping about three fold as time consuming. Would it be hard to make the software notice I actually edited something? Many people actually want to solve problems, and they just end up creating a program as a side product. They do not set out to study libraries and do not want to actually write any code that is not directly related to the problem they are solving. It's why Matlab is able to charge the price. It sometimes saves time. Some of the users are not primarily software developers but are quite educated and intelligent and their salary is not small.
- keypusher 14y agoAgreed. Without the IDE, there is no reason not to use Python.