I’m curious, are there any Octave users on HN? What are your use cases, in particular different to just an open-source Matlab-like clone? Why Octave not Python?
I use Matlab-likes (actually Scilab rather than Octave) for one offs and interactive use. That’s usually playing with a dataset, test some analysis techniques, quick regressions, solving linear equations systems, this sort of things. I hate having to set up the whole machinery when doing this in Python. Also, the general-purpose nature of Python gets in the way, whereas the Matlab-like syntax is very focused and much less cumbersome. This does not matter much in a script, but is a pain for interactive use. On the other hand, Matlab is terrible to write scripts, with its inconsistencies and its almost-Fortran-but-weirder syntax.
Once the pipeline is set, Python is for scripts that need to be run more than about a dozen times, or need to be run on several datasets, or for things that need to be reproduced exactly (like stuff that goes into a paper). I also use it to prepare datasets from large numbers of calculations where the useful results need to be gathered from dozens/hundreds of files in a more or less complex file structure, often on different computers, with the occasional pass with some post-processing tools.
I really dislike Matplotlib, so rendering is done in something else, usually gnuplot.
That’s for my stuff (mostly atomic-scale modelling and quantum chemistry in materials science), it might be different for other use cases...
I did all my work and wrote my entire biomedical engineering (specifically medical image analysis) thesis on octave.
In the beginning I had started with matlab because my lab mostly used matlab functions. Obviously it's not that I couldn't finish my work on matlab, but I found octave nicer to use, better publication-quality graphs, very friendly open-source community, submitted bugs typically fixed within a couple of days (which was not the case when I submitted bugs in matlab, of which I had reported plenty, particularly when it came to misbehaving graphics), interesting outlooks from studying its source code, ability to keep or distribute my code in the absence of a prohibitive matlab licence, etc.
It is probably true that it is not necessarily as quick as matlab or julia these days, however there is a big red flag when one looks at "benchmarks" online, which is typically that these are used in such contrived ways that a proper octave user would probably not consider as good octave code. (I remember this was also true of julia's benchmarks against python for instance).
Octave in fact is very powerful. Not to mention that to the serious user, much of its power comes from its incredibly powerful interface to its vast library of open-source c++-implemented functions.
As for the why octave and not python (or any other X) question ... honestly, I don't know. E.g. why Linux and not Windows? Honestly, both are fine. But, without having an explicit list of arguments, I just find linux is more enjoyable and gets out of my way, whereas on windows I find myself having to do extra steps and double-check things at every turn. Well, somehow, I have the same vibe when working on octave vs python or julia. But that's not to say I don't enjoy those other languages too. To me it just feels Octave is just ... nicer and gets out of your way somehow. It's definitely my language of choice for quickly trying ideas out.
I didn't see it anywhere, so: Octave start up speed is magnificent. If you have a larger shell script and just need to grab some eigenvalues, Octave can be as fast to startup, do its work and exit, as awk or grep would be for text manipulation.
MATLAB takes a while to start, Julia and Python need to spend a good amount of time importing/compiling.
As a MATLAB license holder, I'm currently migrating some MATLAB code to be compatible with both.
My license doesn't allow multiple computers, so MATLAB is living on my laptop. I'd rather run longer computations on my desktop system, which can handle these loads for a long period time without getting stressed thermally.
My use case is to run ground-truth code designed by my professor and cross-check the results generated by my scientific software. These MATLAB/Octave generated values are also incorporated to sanity check and CI pipelines to test developed software's sanity and computational integrity.
MATLAB/Octave's main advantage over Python is that the syntax for manipulating matrices is way way way nicer. They also have a lot of toolboxes and maths related functions that would really take a long time to find/implement in Python.
MATLAB had another significant advantage over Python. Its plotting support is really really really good. Given how much time scientists spend making graphs it's hard to understate how important that is, or how much better MATLAB is at plotting than Python or Octave (or Julia).
I have always used Octave and never Matlab. The professor who introduced me to Octave some 15 years ago was quite the free software activist and did not even tell us that it was a clone.
Today, I am a heavy user of Octave's linear algebra algorithms for large sparse matrices. I also use Python/numpy for other things, and sometimes for linear algebra too (due to the insistence of my coworkers), but it is much less pleasurable and quite annoying. Also, the linear solvers in scipy are sub-par compared to the state of the art solvers in Octave. Once, we found a well-conditioned 6x6 system that linalg.solve failed to solve!
As an aside, I have never used Octave for plotting, and I hate the gui interface; my use case is 100% non-interactive, using scripts.
Signal processing, 15 years using Matlab/Octave and 10 years using Python. It's easier to prototyping signal processing algorithms in Matlab/Octave. Some important functions in Scipy perform much worse than Matlab/Octave.
In several cases over the years, I’ve inherited matlab code and tried to run it on octave. Never worked, once. There were always just one small missing syntax, function, edge case of handling filenames...
Once I inherited code written for octave. Did its job, worked like a charm, mostly. The CLI interface was clunky compared to typical shell tools so I had to do some shell wrappers and incantations to automate what I wanted. I don’t know if this is due to the author or to octave but I suspect its focus is on interactive use to the detriment of developing programs.
I keep a jupyterlab docker container running at all times on my win10 laptop, with windows-home mounted. Instantly available notebooks from my browser - works like a charm for interactive use.
I much prefer python since it lets you move continuously from one-off hack in a notebook cell to a web scale application, parses any weird file, serves web content in 3 lines, etc.
I use it often. Even after 20 years of using numeric/numarray/numpy, I still feel more productive in Octave and Matlab. Mostly time series analysis, signal processing, image analysis. Occasional modeling and simulation work. I think for me it’s that octave does it’s job well and doesn’t try to do other things. Python grates on me occasionally since it’s libraries seem to lack focus and try to be too much for too broad of an audience. I like focused, simple tools. I do use Python, but not as my sole tool. I don’t understand he mindset that one tool/language should do everything. Easier for me to learn many languages than one language and have to learn many independently designed libraries.
Here is my story. We used Matlab, but then the polling of the license server got more and more aggressive(or we were unlucky). Just when you want to work on the 8h flight the thing popping up and saying 'need to connect to the internet' is not fun. Now we had a volume license(I think). And it needs server access every 10 times you run a script. Try making software which wants to use the Ethernetport with something else, it is just annoying. So you pay a lot of money and get annoyed...
Octave is slower than Matlab (at least last time, no loop acceleration), and no GUI library. So we went straight to python.
I use it to do general linear algebra scripts and as a linalg calculator. The language is imo much nicer at this than python, and it also starts up way faster.
Also, symbolic calculation is a lot less cumbersome than in python!
I actually went the other way from Octave to scipy, numpy and matplotlib. This really long ago though - around 2007. As a programmer moving into quants needing to process huge amounts of data python/matplotlib seemed a much better fit for me. It also enabled me to run multiprocess number crunching on my 8-core desktop at home. Octave would be able to use just 1 core, I could code the python scripts to use all 8.
Octave was really good to prototype and enabled me to get somethings done really quick. But once I got to know the python libraries better it just seemed easier. I could do all my data processing and quants in a single language.
I'm sure much has changed and was actually quite sad when the original author of Octave (John Eaton) mentioned in 2017 that he was unable to maintain it.
I've lost touch on Octave over the years and genuinely pleased to see that it is still being actively maintained. I think its time for me to see what I've missed in the past 13 years.
I use for it for the various RF/EE/Controls related matrix stuff, as others have said it is often quicker to use to do some sanity checks even though at work we have actual MATLAB/CST Studio etc.
Using Octave over matlab is preferable for me for the same reasons many people use GIMP over photoshop. I use octave for things that are reasonably self-contained, like the metaphorical editing of a single image. I like Python over octave for the kinds of uses that might cause someone to use python over GIMP for image processing, to extend the metaphor.
I use it from time to time. Octave performs very well to the point, where you have several encapsulated for-loops, where Matlab is several times faster in my experience.
I don't use Octave, but I have a little in the past, and I have to teach students to use Matlab (2021 should be the last year of that before we switch to Python though), and I've done a lot of numerical and other programming in Python and Matlab, in each for ~20 years.
In my opinion Matlab is a terribly designed language that has haphazardly grown features by accretion. Anything other than matrices and vectors is far more difficult than it needs to be. Therefore I consider Octave a bit of a lost cause; I think aiming for compatibility with terrible won't lead anywhere good.
Actually Octave has one useful feature Matlab is missing, operators +=, -=, etc., so perfect compatibility is not exactly the goal.
It seems to me the only reason to use Octave is if you happen to have a large legacy Matlab code base that doesn't depend on any of Matlab's proprietary toolboxes (unlikely, as those toolboxes are one of the main reasons people use Matlab).
I believe Python is superior to Matlab/Octave in almost every way. I think Matlab/Octave has two or three very small advantages over Python, and one larger but very niche one:
1) Matlab/Octave's matrix literal syntax is nicer and less verbose ([1 2; 3 4] vs. np.array([[1, 2], [3, 4]])). Irrelevant in most cases, as most substantive programs will have few literals in them. Note that those missing commas are a frequent source of bugs, too, e.g. [1 -2; 1 - 2] is an error, so really the Matlab/Octave is better written as [1, 2; 3, 4].
2) Because Matlab/Octave is primarily for numerical calculations, you don't need to import libraries to get started. Not a big deal as I always have a Jupyter QtConsole running with Python, Numpy and Sympy ready to use.
3) Basic 3D plotting in Matlab is still a little easier (Python is better for complex 3D plotting though). Not sure what Octave's story is for 3D plots.
4) The aforementioned proprietary Matlab toolboxes, if you happen to be working in one of the narrow niches they're good for. Python has similar large library advantages in other (and more) areas. Octave has some equivalent open source library bindings, but that's the biggest incompatibility with Matlab.
20 years ago Matlab was pretty good, but it's barely changed since then, and Python has long overtaken it in most areas. Octave seems to have caught up with Matlab on the GUI front (but Jupyter Notebooks are much nicer for many things (Octave can do Jupyter too), and Python has a selection of mostly equivalent IDEs, e.g. Spyder). Python, being a general purpose programming language, can do all the non-maths things surrounding the maths much easier. Data input/output, data processing, string processing, network access, etc., as well as UI things like Jupyter Notebooks. In my opinion Python's also better at quite a lot of maths stuff, like large integers, arbitrary precision, symbolic algebra, higher dimensional arrays, or dataframes with Pandas. I also much prefer 0-based indexing and half-open ranges.
Matlab's licensing is quite problematic. Licenses for business/research use are incredibly expensive, and licenses for student use are relatively cheap. I consider it unethical to teach students to use a proprietary language that will cost their future employers thousands, but that's been Matlab's sales strategy for decades. Switching to Octave is an option for teaching and some business/research use, but switching to Python, with its much bigger ecosystem, seems more sensible to me (unless you have a big existing Matlab code base).
I'm hoping the next generation will move off of TI-8x calculators and into things like Octave for grade school use.
There was a point in my education where I had mastered my trusty TI-83; I knew the purpose of every single function and how to use them. But then, I started running into problems in the real world that required more than 32 KB of memory to solve. When I moved to a laptop I had to relearn all of that knowledge again. Haven't touched my TI-83 since.
It would be nice if the tools we learned how to use in school could also be useful in solving our problems after we graduate!
I wish they'd rather use python or Julia. GNU Octave is great. But as a clone of Matlab it's constraint by compatibility and doomed to always be second* and at worst an enabler for Matlab. I'd rather break the dominance that Matlab has in many fields and replace it with free software.
* There are a few aspects where it is better. For example I believe the variable editor introduced one or two releases ago is nicer as it allows inline evaluation.
At least in the US, high school education still and probably will use TI calculators for the foreseeable future. They are a long existing standard and very practical for that environment. However, most AP classes do allow the use of the TI-Nspire which is a much more capable platform than the TI-8x series. And even in that series, the TI-84 and variants are much more popular now.
At the college level, at least for engineering programs, at my school there was a pretty big emphasis on doing a lot by hand besides trivial stuff like addition and multiplication. The extent that we would utilize calculators seemed very minimal. Most of the degree programs including teaching students one or more of Mathematica, matlab, octave, and R. But I would say it sounds like the depth you had for the TI-83 doesn't really exist in the modern education, rather it is a more broad use of multiple platforms.
Not sure what kind of lobbying & campaign contributions have built the TI stronghold on the education market, but highschool kids today seem to use pretty much the same TI-85 that I had in the 1990s, except with a more colorful shell.
Matlab licensing is prohibitive for everyone in a team to have one and WAN licences are 4x the cost of a seat, so we tend to have code capable of running in both octave and matlab in general. The model is all users can use octave for lower level / common code components and it works finw, and then the system level guys who really require matlab for its toolboxes can also use them and that common code also. If it was not for the advanced matlab toolboxes (and some key engineers who know only matlab) we'd probably have moved to python or Julia.l to get away from this two tier use model
[+] [-] rich_sasha|5 years ago|reply
I’m curious, not saying either option is bad.
[+] [-] kergonath|5 years ago|reply
Once the pipeline is set, Python is for scripts that need to be run more than about a dozen times, or need to be run on several datasets, or for things that need to be reproduced exactly (like stuff that goes into a paper). I also use it to prepare datasets from large numbers of calculations where the useful results need to be gathered from dozens/hundreds of files in a more or less complex file structure, often on different computers, with the occasional pass with some post-processing tools.
I really dislike Matplotlib, so rendering is done in something else, usually gnuplot.
That’s for my stuff (mostly atomic-scale modelling and quantum chemistry in materials science), it might be different for other use cases...
[+] [-] tpoacher|5 years ago|reply
In the beginning I had started with matlab because my lab mostly used matlab functions. Obviously it's not that I couldn't finish my work on matlab, but I found octave nicer to use, better publication-quality graphs, very friendly open-source community, submitted bugs typically fixed within a couple of days (which was not the case when I submitted bugs in matlab, of which I had reported plenty, particularly when it came to misbehaving graphics), interesting outlooks from studying its source code, ability to keep or distribute my code in the absence of a prohibitive matlab licence, etc.
It is probably true that it is not necessarily as quick as matlab or julia these days, however there is a big red flag when one looks at "benchmarks" online, which is typically that these are used in such contrived ways that a proper octave user would probably not consider as good octave code. (I remember this was also true of julia's benchmarks against python for instance).
Octave in fact is very powerful. Not to mention that to the serious user, much of its power comes from its incredibly powerful interface to its vast library of open-source c++-implemented functions.
As for the why octave and not python (or any other X) question ... honestly, I don't know. E.g. why Linux and not Windows? Honestly, both are fine. But, without having an explicit list of arguments, I just find linux is more enjoyable and gets out of my way, whereas on windows I find myself having to do extra steps and double-check things at every turn. Well, somehow, I have the same vibe when working on octave vs python or julia. But that's not to say I don't enjoy those other languages too. To me it just feels Octave is just ... nicer and gets out of your way somehow. It's definitely my language of choice for quickly trying ideas out.
[+] [-] xvilka|5 years ago|reply
[+] [-] marmaduke|5 years ago|reply
MATLAB takes a while to start, Julia and Python need to spend a good amount of time importing/compiling.
[+] [-] bayindirh|5 years ago|reply
My license doesn't allow multiple computers, so MATLAB is living on my laptop. I'd rather run longer computations on my desktop system, which can handle these loads for a long period time without getting stressed thermally.
My use case is to run ground-truth code designed by my professor and cross-check the results generated by my scientific software. These MATLAB/Octave generated values are also incorporated to sanity check and CI pipelines to test developed software's sanity and computational integrity.
[+] [-] abdullahkhalids|5 years ago|reply
Better than python because I don't have to import libraries.
[+] [-] IshKebab|5 years ago|reply
MATLAB had another significant advantage over Python. Its plotting support is really really really good. Given how much time scientists spend making graphs it's hard to understate how important that is, or how much better MATLAB is at plotting than Python or Octave (or Julia).
[+] [-] enriquto|5 years ago|reply
Today, I am a heavy user of Octave's linear algebra algorithms for large sparse matrices. I also use Python/numpy for other things, and sometimes for linear algebra too (due to the insistence of my coworkers), but it is much less pleasurable and quite annoying. Also, the linear solvers in scipy are sub-par compared to the state of the art solvers in Octave. Once, we found a well-conditioned 6x6 system that linalg.solve failed to solve!
As an aside, I have never used Octave for plotting, and I hate the gui interface; my use case is 100% non-interactive, using scripts.
[+] [-] ai_gandalf|5 years ago|reply
[+] [-] thatsadude|5 years ago|reply
[+] [-] pletnes|5 years ago|reply
Once I inherited code written for octave. Did its job, worked like a charm, mostly. The CLI interface was clunky compared to typical shell tools so I had to do some shell wrappers and incantations to automate what I wanted. I don’t know if this is due to the author or to octave but I suspect its focus is on interactive use to the detriment of developing programs.
I keep a jupyterlab docker container running at all times on my win10 laptop, with windows-home mounted. Instantly available notebooks from my browser - works like a charm for interactive use.
I much prefer python since it lets you move continuously from one-off hack in a notebook cell to a web scale application, parses any weird file, serves web content in 3 lines, etc.
[+] [-] paijiut|5 years ago|reply
[+] [-] andi999|5 years ago|reply
Octave is slower than Matlab (at least last time, no loop acceleration), and no GUI library. So we went straight to python.
[+] [-] sudosysgen|5 years ago|reply
Also, symbolic calculation is a lot less cumbersome than in python!
[+] [-] gautamdivgi|5 years ago|reply
Octave was really good to prototype and enabled me to get somethings done really quick. But once I got to know the python libraries better it just seemed easier. I could do all my data processing and quants in a single language.
I'm sure much has changed and was actually quite sad when the original author of Octave (John Eaton) mentioned in 2017 that he was unable to maintain it.
I've lost touch on Octave over the years and genuinely pleased to see that it is still being actively maintained. I think its time for me to see what I've missed in the past 13 years.
[+] [-] PoachedSausage|5 years ago|reply
[+] [-] yummypaint|5 years ago|reply
[+] [-] tripa|5 years ago|reply
[+] [-] smallpipe|5 years ago|reply
Details in my previous comment: https://news.ycombinator.com/item?id=25441585
[+] [-] BlueTemplar|5 years ago|reply
However, its lack of support for Unicode variables and filenames is very frustrating in this day and age…
(I understand that they are being stuck due to Matlab having poor support too.)
[+] [-] unknown|5 years ago|reply
[deleted]
[+] [-] Qem|5 years ago|reply
[+] [-] Haemm0r|5 years ago|reply
[+] [-] mkl|5 years ago|reply
I don't use Octave, but I have a little in the past, and I have to teach students to use Matlab (2021 should be the last year of that before we switch to Python though), and I've done a lot of numerical and other programming in Python and Matlab, in each for ~20 years.
In my opinion Matlab is a terribly designed language that has haphazardly grown features by accretion. Anything other than matrices and vectors is far more difficult than it needs to be. Therefore I consider Octave a bit of a lost cause; I think aiming for compatibility with terrible won't lead anywhere good.
Actually Octave has one useful feature Matlab is missing, operators +=, -=, etc., so perfect compatibility is not exactly the goal.
It seems to me the only reason to use Octave is if you happen to have a large legacy Matlab code base that doesn't depend on any of Matlab's proprietary toolboxes (unlikely, as those toolboxes are one of the main reasons people use Matlab).
I believe Python is superior to Matlab/Octave in almost every way. I think Matlab/Octave has two or three very small advantages over Python, and one larger but very niche one:
1) Matlab/Octave's matrix literal syntax is nicer and less verbose ([1 2; 3 4] vs. np.array([[1, 2], [3, 4]])). Irrelevant in most cases, as most substantive programs will have few literals in them. Note that those missing commas are a frequent source of bugs, too, e.g. [1 -2; 1 - 2] is an error, so really the Matlab/Octave is better written as [1, 2; 3, 4].
2) Because Matlab/Octave is primarily for numerical calculations, you don't need to import libraries to get started. Not a big deal as I always have a Jupyter QtConsole running with Python, Numpy and Sympy ready to use.
3) Basic 3D plotting in Matlab is still a little easier (Python is better for complex 3D plotting though). Not sure what Octave's story is for 3D plots.
4) The aforementioned proprietary Matlab toolboxes, if you happen to be working in one of the narrow niches they're good for. Python has similar large library advantages in other (and more) areas. Octave has some equivalent open source library bindings, but that's the biggest incompatibility with Matlab.
20 years ago Matlab was pretty good, but it's barely changed since then, and Python has long overtaken it in most areas. Octave seems to have caught up with Matlab on the GUI front (but Jupyter Notebooks are much nicer for many things (Octave can do Jupyter too), and Python has a selection of mostly equivalent IDEs, e.g. Spyder). Python, being a general purpose programming language, can do all the non-maths things surrounding the maths much easier. Data input/output, data processing, string processing, network access, etc., as well as UI things like Jupyter Notebooks. In my opinion Python's also better at quite a lot of maths stuff, like large integers, arbitrary precision, symbolic algebra, higher dimensional arrays, or dataframes with Pandas. I also much prefer 0-based indexing and half-open ranges.
Matlab's licensing is quite problematic. Licenses for business/research use are incredibly expensive, and licenses for student use are relatively cheap. I consider it unethical to teach students to use a proprietary language that will cost their future employers thousands, but that's been Matlab's sales strategy for decades. Switching to Octave is an option for teaching and some business/research use, but switching to Python, with its much bigger ecosystem, seems more sensible to me (unless you have a big existing Matlab code base).
[+] [-] rightbyte|5 years ago|reply
[+] [-] castratikron|5 years ago|reply
There was a point in my education where I had mastered my trusty TI-83; I knew the purpose of every single function and how to use them. But then, I started running into problems in the real world that required more than 32 KB of memory to solve. When I moved to a laptop I had to relearn all of that knowledge again. Haven't touched my TI-83 since.
It would be nice if the tools we learned how to use in school could also be useful in solving our problems after we graduate!
[+] [-] fafner|5 years ago|reply
* There are a few aspects where it is better. For example I believe the variable editor introduced one or two releases ago is nicer as it allows inline evaluation.
[+] [-] KingMachiavelli|5 years ago|reply
At the college level, at least for engineering programs, at my school there was a pretty big emphasis on doing a lot by hand besides trivial stuff like addition and multiplication. The extent that we would utilize calculators seemed very minimal. Most of the degree programs including teaching students one or more of Mathematica, matlab, octave, and R. But I would say it sounds like the depth you had for the TI-83 doesn't really exist in the modern education, rather it is a more broad use of multiple platforms.
[+] [-] nikanj|5 years ago|reply
[+] [-] probably_wrong|5 years ago|reply
[+] [-] ljosifov|5 years ago|reply
[+] [-] tails4e|5 years ago|reply
[+] [-] elisaado|5 years ago|reply
[+] [-] crunkykd|5 years ago|reply
[+] [-] ibraheemmmoosa|5 years ago|reply