5 ms·
GNU/Octave has a great strength and weakness that it uses the Matlab language. This is great for many who are educated with Matlab but don't know much else. Aft
by std_throwawayay 8y ago
GNU/Octave has a great strength and weakness that it uses the Matlab language. This is great for many who are educated with Matlab but don't know much else. After some time I found Python and the ecosystem around numpy/scipy/matplotlib fit my problems much better. Python just much more flexible and better suited for general programming tasks than that weird matrix oriented language.
Why should anyone use Octave over Matlab?
- Licensing cost.
- Freedom.
Why should anyone learn Octave instead of Python?
- It's a bit easier to get started for scientists who are not programmers.
- If you mostly do vector/matrix math, the language is nice.
- Otherwise I don't know any good point.
All in all I like a free alternative to Matlab but have the feeling that most people are just better served by joining the much bigger Python ecosystem. (Or maybe R/Julia/Rust which I don't know so much about in this context.)
- TickleSteve 8y agoIn an engineering setting, MatLab has more mindshare, but that may be changing. The related product Simulink is not uncommon in larger engineering firms also. Back in the day, the community around MatLab was quite large, but likely has declined in size in the last few years with the rise of Python in this area.
- dtech 8y ago> In an engineering setting, MatLab has more mindshare, but that may be changing. This has definitely been changing for a while. All engineering studies of my old university except for computer science and mathematics have switched from Java+Matlab to Python over the last years. I've already seen this have an effect on workplaces, where new students prefer to use Python and are generally allowed to.
- speedplane 8y ago> All engineering studies of my old university except for computer science and mathematics have switched from Java+Matlab to Python over the last years I'd love to witness this. I used Matlab heavily as an engineering student, and now mostly work in Python. Python is definitely better for complex programming, but where the program is simple and the math is hard, Matlab seems like a great tool. I'm curious what tools/libraries python users now use that brings Python up to the usability of matlab?
- dtech 8y ago> I'm curious what tools/libraries python users now use that brings Python up to the usability of matlab? 95% SciPy, NumPy and Spyder. I'm sure the massive savings on license costs also make it attractive.
- speedplane 8y ago> I'm sure the massive savings on license costs also make it attractive. I remember shelling out $60 for a true license of Matlab while in college. I remember thinking, "well you're an engineer now, and this cost is part of that", even thugh it felt like a small fortune. But official licensed version required you to insert the CD into the computer every time you used it, so I gave up a got the pirated version instead.
- 4thaccount 8y agoLol $60 If you get the commercial version out of college it is thousands of dollars for base and thousands for each "toolbox". Want to have database functionality? Thousands of dollars, optimization functions? Thousands of dollars. That might be worth it for national labs that like how the native IDE, plotting, GUI, widgets, ability to put into commercial projects (they've secured licensing for the math solvers for you)...etc. It is all better integrated than Python even with it's nice Spyder IDE.
- nrclark 8y agoOut of curiosity, do you know of a Simulink equivalent that works with Octave? Or anything close?
- satish-setty 8y agoNot Octave, but the other Matlab-clone Scilab has a package called Xcos which is similar to Simulink.
- 4thaccount 8y agoOctave strives to be 1:1 with Matlab, while Scilab aims to be close to 1:1. A subtle distinction there :)
- ryl00 8y ago"Not uncommon" is an understatement. In some workplaces, Simulink is as pervasive and core to engineering as Excel is to the business world in general.
- adrianratnapala 8y agoI used Octave in Uni when my assignments had to be done in (commercial) MATLAB. I could get most of the code working at home, and then port. Matlab compatibility was the key benefit, even though the MATLAB language is a bit stupid. And that was before numerical python existed. Now, MATLAB compatibility is about the only reason to use Octave. But a better idea is to get out of the MATLABiverse altogether. As for reasons to use Matlab: Matlab comes with XYZ toolkit: This isactually a good reason if you know that XYZ toolkit is your core business. In general though, the Python ecosystem is far bigger that Matlab's one. Easy for scientist: Trap. Every MATLAB using scientist I know ends up with a code base that is too complex (~1000-5000 lines of code) for the language, but is perfect for Python. (Exactly like how programmers start projects with Python that then grow too big for that language). Admittedly falling into the trap once might be cheaper than learning Python, assuming you never need to program anything again in your life. Vector/matrix math: Numpy has all the same vector/matrix stuff including a class which does matrix-multiply under that '* ' operator like MATLAB. But that tMatlabhat operator is a trap: '.* ' is far more common in MATLAB code and accidentally using '* ' is a common bug. This is effortlessly avoided in Numpy standard classes.
- microtherion 8y ago> Every MATLAB using scientist I know ends up with a code base that is too complex (~1000-5000 lines of code) for the language, but is perfect for Python. Exactly! And I feel R has a similar problem.
- pvitz 8y agoMy experience with this is that it is not the necessarily the language that makes it too complex, but the lack of training in proper software development. I have got mainly colleagues who were trained as economists, actuaries or mathematicians using Python, R, Matlab or Excel/VBA as the language of their choice and the result is always the same. Coming from physics myself,I understand that beautiful notation can make things much easier and can be often the way to find great solutions, but proper organization will most often be sufficient.
- rct42 8y agoI find that I'm more productive prototyping algorithms in Matlab than in Python. In fact, I tend to write it first in Matlab, port it to Python, and finally port it to C (to run on an embedded device)! As for Octave, I've used it a couple times in the past but found the environment underwhelming (especially so when creating plots). I also tend to run into various compatibility problems when running scripts developed in Matlab.
- grwilliams 8y agoI've used Octave and the Python stack and I can confirm that it is much easier to focus on the problem at hand using Octave. One can focus on the math and algorithms and not the language. It is the same for me with R vs. the Python equivalents. So your strategy of designing in Matlab and porting later (if necessary) makes a lot of sense.
- 4thaccount 8y agoEver try MicroPython for embedding?
- rct42 8y agoI haven't used MicroPython and suspect it wouldn't suit my use case. I often have to design things that run on battery power (sometimes a CR2025) and so the firmware needs to be quite lean. Also most of the time is typically spent interfacing to hardware and peripherals so using something other than C wouldn't make sense.
- 4thaccount 8y agoGotcha. At that level I guess your only options are Assembly, C, or FORTH.
- patrec 8y agoMatlab is much nicer to use than python for problems that fall well into its (much narrower) niche. It's super easy to bash some matrices together with nice syntax, plot the results and interactively and iteratively develop code. Profiling python kinda sucks, whereas in matlab the IDE will color code each line of code based on profile information. Reloading python code sucks, whereas in matlab you just change a function file and the modified definition becomes immediately available in your interactive session. Everything is much simpler and more immediate (and of course also more limiting, if you want to do some general purpose software engineering). It also used to be significantly more performant than python for many important tasks (and maybe still is). Octave, on the other hand is IMO really only of interest if you somehow need some degree of compatibility with the Matlab ecosystem or want to teach non-programmers how to do some basic numerical linear algebra stuff. Otherwise, if you want something free, just stick with python.
- knbknb 8y agoMatlab has lots of solvers for all types of families of differential equations. I think these are lacking (in their completeness and richness of documentation) in other programming languages ( at least this holds for R - much fewer solvers). I don't know how complete the Octave equivalents are.