10 ms·
GNU Octave 5.1.0
- std_throwawayay 8y agoGNU/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.
- rwmj 8y agoCan anyone comment on how Octave compares specifically to Mathematica, in terms of features and ease of use?
- adonese 8y agoI've not used Mathematica, so my views would be as useless here. Octave can be greatly compared to MATLAB. It actually tries its best to be as compatible with MATLAB as possible. So, one can say it is as closed to Mathematica as MATLAB is.
- ktpsns 8y agoOctave and Matlab focus on numerical computing, while Mathematica focusses on symbolic computing. The first means working with arrays (and higher dimensional arrays) of (mostly) floating point numbers, while the later means working with abstract syntax trees of mathematical expressions.
- babayega2 8y agoSpecifically, the one "equivalent" to Mathematica is Maxima [0], I remember using it for symbolic computation on my linux machine. Especialy coupled with Wx GUI [1]. [0]: http://maxima.sourceforge.net/ http://maxima.sourceforge.net/ [1]: https://wxmaxima-developers.github.io/wxmaxima/ https://wxmaxima-developers.github.io/wxmaxima/
- ktpsns 8y agoBoth Maxima and GNU Octave are pretty old (mature?) projects with probably outdated-looking (feeling) GUIs. Just to mention some younger and more "fresh" projects: In the SciPy ecosystem, there is SymPy https://www.sympy.org https://www.sympy.org which has the obvious advantage of being Python, gaining from a big (also scientific) ecosystem, such as numpy, pandas or the JupyterLab. A large OSS player is nowadays also SageMath https://www.sagemath.org/ https://www.sagemath.org/ which is a kind-of-meta CAS which can actually proxy evaluations to Mathematica, Maxima, Octave and many others, in a more or less uniform pythonic notation. Probably needless to say, when it comes to evaluation power (for instance for integral solving), Mathematica is unrivalled from OSS projects. However, in certain fields (such as number theory for SageMath or the overall web notebook infrastructure by the IPython and Jupyter projects), the concurrency is catching up or may already have overtaken Wolfram's products.
- nrclark 8y agoGreat job to the Octave team! Octave is a great tool, and it addresses a very real need - breaking MATLAB's stranglehold on academic computing. Every programming course I took as an EE undergrad (other than Intro to Programming) was in MATLAB. 14 years later, and it's still the standard tool in my alma mater's EE department. Having a FOSS equivalent is huge. So raise a glass to the Octave dev team. They work hard to provide a FOSS tool that can run MATLAB code, which gives you the software you need for self-guided learning from university materials. Or for your all your computational needs. And Octave is a great tool even if you don't need MATLAB compatibility. Try it out the next time you've got some numerical computing to do. Not an Octave dev, just a fan of the project.
- dvfjsdhgfv 8y ago> 14 years later, and it's still the standard tool in my alma mater's EE department. Unfortunately it's still omnipresent. Even in very basic courses, where the abilities of Octave would be enough by a large margin. I don't think it changes until the next generation comes.
- std_throwawayay 8y ago> I don't think it changes until the next generation comes. The next generation of professors.
- PascLeRasc 8y agoI had a few younger EE professors try to get us to use Python for our coursework just to get pushback from the status quo students talking about "but what about preparing us for industry??". It was pretty disappointing since Python's so much nicer than Matlab for signal processing IMO.
- ilayn 8y agoWhat? The industry doesn't use matlab except a few big places. Of those, most are also now considering switching to Python. They need to get out there and do some polling.
- usgroup 8y agoOctave is just great if you do a spot of computational maths for a living and need to smash stuff out quickly. It’s interactive, really well suited for matrix operations, has all the packages you’d expect for analysis, optimisation, etc. Like others have said, once you nail it in Octave, move it to C++ for production and then wrap it in R, Python, etc to your hearts content.
- 4thaccount 8y agoThe optimization functionality for linear programming, mixed integer linear programming...etc is pretty much non-existent in Octave. At least the kind of optimization common in Operations Research and used in production in thousands of companies world-wide. Python and Julia have libraries to call out to dedicated solvers like CPLEX, GUROBI, GLPK, and CBC/CLP that are written in C/C++. I'm not sure if Octave has a decent interface.
- deleted 8y ago[deleted]
- usgroup 8y agoHere’s the whole non existent category: https://octave.org/doc/v4.2.0/Optimization.html https://octave.org/doc/v4.2.0/Optimization.html
- 4thaccount 8y agoGood to see it has some support. Still pretty minimum in comparison to Julia's JuMP library though. I stand corrected.
- slavik81 8y agoOne thing I find handy is to format my debug printing for my vector and matrix types in Octave syntax. It makes it easier to debug my C++ code when I can copy/paste values directly into Octave for further analysis. e.g. vec3f x = {1,2,3}; fmt::print("x = {}\n", x); // output: // x = [1; 2; 3]
- jakeogh 8y agoSage has an Octave interface: http://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/octave.html http://doc.sagemath.org/html/en/reference/interfaces/sage/in...
- jason_slack 8y agoThis looks awesome to help me take some old matlab projects and just them off. I wish I knew about Octave before. The docs don’t mention this but can it create candlestick charts or can I extend using C++?
- dekalog 8y agoYou can create candlestick charts using the "candle" function from the Octave Financial package, function reference is at https://octave.sourceforge.io/financial/function/candle.html https://octave.sourceforge.io/financial/function/candle.html Also, extending with C++ is easy, see https://octave.org/doc/v4.0.1/Getting-Started-with-Oct_002dFiles.html#Getting-Started-with-Oct_002dFiles https://octave.org/doc/v4.0.1/Getting-Started-with-Oct_002dF...
- jason_slack 8y agoThis is awesome. Thank you.
- openloop 8y agoExciting!
- knappa 8y agoIs there a story behind why the version numbers went from 4.4 to 5.1?
- jononor 8y agoTo all contributors, thank you for Octave! I used it successfully in my EE degree in 2010 for all my Digital Signal Processing assignments, instead of MATLAB.
- mrreelmo 8y agoI use Python for most of my general programming needs, but in an engineering environment MATLAB (unfortunately) still has an edge. As a programming language it’s quite sh*tty, but it’s strength is in the high quality toolboxes. I work quite a lot with constraint non-linear optimisation and I still have to find a Python or Julia library as flexible and robust as the MATLAB toolbox. I think Octave is a good FOSS compatibly solution, but the main strength of MATLAB (the set of toolboxes) is unfortunately missing.
- mlevental 8y agohttps://cvxopt.org https://cvxopt.org
- mruts 8y agopart of one of my previous jobs involved converting code from MatLab to Scala. Needless to say, it wasn't very fun. Languages like Matlab, Stata, SAS, or R don't seem to be designed for professional developers. They tend to break all the assumptions that every other languages have (like array indices beginning with 0). I also feel this way about Pandas, it seems like it was designed by a data scientist and not a developer. Because the people using these particular languages don't care about elegance (they usually just want the graphs or papers or whatever) and that no one is writing commercial systems that need to be maintained, there's no real incentive for them to design a language that makes any sense. Making things ad-hoc and less axiomatic does have its benefits however, these kinds of languages can be surprisingly expressive and powerful.
- rick22 8y agoMATLAB can charge for the software but making it opensource would be really ethical considering the software is used heavily in research. More eyeballs to view the correctness of the software is crucial.