9 ms·
Is GNU Octave still relevant in the fields where it once was considered as a FOSS alternative to MATLAB? Since it seems researchers are migrating away from MAT
by ducktective 6y ago
Is GNU Octave still relevant in the fields where it once was considered as a FOSS alternative to MATLAB?
Since it seems researchers are migrating away from MATLAB itself to python (numpy/scipy).
BTW, GNU Octave is fantastic! You can setup termux ([1]) in your android phone and `apt install octave`. Now you have a portable REPL for many advanced mathematical problems you might face for example in solving homeworks (Singular Value Decomposition, Curve Fitting, etc)
[1] https://wiki.octave.org/Octave_for_Android https://wiki.octave.org/Octave_for_Android
- montebicyclelo 6y agoAnecdotally: Some undergraduate degrees teach MATLAB, and it's the first time programming for many of the students. It is great that the students can use a FOSS alternative on their own machines. Doing the work in Python and then translating back to MATLAB would be a bit too much a stretch. As far as I could tell, my undergraduate department ran on MATLAB (and I suspect it still does).
- qnzy 6y agoI'm not sure how relevant it is. I use it almost everyday (EE). For me it basically serves as my (very advanced) calculator. If my scripts get above a certain complexity, I'll move to Python, but for smaller things I much prefer Octave.
- BlueTemplar 6y agoJust one data point: in our 2nd year Masters of Computational Physics, we have : - 3 teachers using Octave (and one of them wants strict Matlab syntax). - 0.5 teachers using "C+" (C with some C++ libraries thrown in, but no OOP), with maybe some Python sprinkled on. - 1.5 teachers using Fortran, with maybe some Python sprinkled on. - 1 teacher using full Python (with numpy and matplotlib)
- panpanna 6y agoOur university paid top dollar for Matlab site licenses. Nowadays students mostly use octave. Termux is such a lovely project. Works also great on chromebooks and chromebook tablets.
- curt15 6y agoCouldn't this be used by Mathworks against Octave if SCOTUS rules that reimplementing APIs is a copyright violation?
- panpanna 6y agoMate, octave getting sued would be the least of my worries if supereme court rules that way...
- sudosysgen 6y agoIs Octave based in the US?
- alexhutcheson 6y agoMany Chromebooks and Chromebook tablets now have a real Linux environment available: https://support.google.com/chromebook/answer/9145439 https://support.google.com/chromebook/answer/9145439
- ddek 6y agoAll anecdotes, but In my Chem degree we used MATLAB, as did all the (non software) engineers I knew. My brother is a physics PhD student in Zurich, he uses MATLAB almost exclusively. I think the universities use it for two reasons. Firstly, they’ve paid for the license and many proprietary add-ons, so they may as well use it. Secondly, MATLAB is a fast and safe playground for bright students who don’t know how to code. Teaching students to code well is too expensive (mainly in time). While I was working on my masters (comp chem) I encountered a bottleneck written by a previous masters student. This was a python library. The student had written all his numerical methods manually. He was using python lists for vectors. His algorithms were great though. If you just use MATLAB, no one is making that mistake.
- signaru 6y agoA few reasons: legacy code in research (often headed by older staff), Matlab's speed out of the box, use in industry (Toyota), and toolboxes developed by Mathworks itself. For those who don't want to resort to piracy when doing "home work", Octave is a really good alternative for less complex scripts.
- enriquto 6y agoGNU Octave is a much better language for linear algebra problems that python+numpy. If all you have to do is state and solve some systems, you can typically do it in one or two lines of octave, while in python you need to import libraries and use a bizarre notation (either @ or .dot look very ugly in formulas). Besides, the sparse linear solvers are much more performant in octave than in numpy.linalg (because the scipy developers are notorious anti-GPL fanatics and they refuse to use the state of the art free solvers due to stupid license reasons). I for one use octave almost everyday, and I'm a bit annoyed when I have to turn something into python.
- jsw97 6y agoAmen to this. The effortless translation of matrix expressions into code is a huge positive for Matlab/Octave and negative for Python. Have not worked with Julia, and I wonder what the experience is there.
- leephillips 6y agoWorking with matrices is similar in Julia. In fact, the syntax was partly influenced by the desire to make it easy for MATLAB users to pick up.
- fluidcruft 6y agoDo you know how difficult it is to translate Matlab into Julia? I have a bunch of Matlab code I'm needing to refresh and honestly I could go either to Python or Julia. Python is more mature, but Julia doesn't seem like it's going to die or anything. I haven't had a lot of time to look into it but my hunch is it would be magnificent to code numerical routines in Julia and access them from Python. There was some work for adding that sort of an interface with octave but it never seemed to work well.
- eigenspace 6y agoJulia is not a Matlab clone, but it does have more in common with Matlab than Python does, so translation is easier. That said, Matlab does encourage quite a few bad habits that can kill performance in Julia, so it's important to try and properly learn Julia idioms too before you just blindly start translating if you care about performance.
- Jenz 6y ago> Since it seems researchers are migrating away from MATLAB itself to python (numpy/scipy). ... and from python (numpy/scipy) to Julia
- michaelcampbell 6y agoI'm sure some are, sure, but I bet the vast majority of researchers: a) are still using python + libs b) that ARE changing from something to something else are moving to python from not-python
- chollida1 6y agoIn finance it looks to be all but dead. 10 years ago, every fund I knew used Octave, or more likely Matlab. Now I don't know of a single peer that uses Ocatave, and only 2 that use Matlab. There are simply better alternatives out there. Matlab and Octave are too "standalone" and too "slow" to implement into any real-time trading model. I saw two big use cases for them 10 years ago, 1: writing Neural networks from scratch where you culd apply vectorized operations over multiple data at the same time. 2: Engineering work as Matlab had a huge, and just as importantly, well tested set of fortran functions for almost any engineering discipline. Both of those uses cases were supplanted by other tools. The former by tensorflow, pytorch, pandas and numpy. The later by excel in alot of instances but also the python eco system of numpy and bespoke libraries on top
- analog31 6y agoI work in a small industrial R&D group that was using a hodgepodge of Excel, Visual Basic, C, and an outdated MATLAB license. I switched from VB to Python, and the rest of the group has followed suit. All that aside, I've noticed that when we bring in a new recruit, if they can code in MATLAB, they can switch to Python in a jiffy. I think the take-away is, if someone offers you a chance to learn how to code in any language, you should take them up on it.
- ImprovedSilence 6y agoI often find myself wondering what the field at large is using. I still use matlab daily in my job (signal processing), and have octave on my personal laptop. Ive played w/ the anaconda/spyder/scipi/numpi suite on my own a bit, mostly cuz it seems thats gotten some momentum, but i dont have a big use for it outside work. We are pretty deep in having a lot of tooling built up in matlab, and i dont see us leaving it anytime soon, and to be honest, I love it, probably cuz thats what im most proficient at.
- jacksonkmarley 6y agoI'm interested to know how you rate the matlab alternatives on interacting visually with the data? I often want to do things in Matlab like plot a largeish data set, then zoom in to different features, or open an array of data in a window and check values. How is octave for that sort of thing? How about python?
- alexhutcheson 6y agoOctave is ok for that, but not as good as Matlab. All the Matlab plotting functions work, but the plots don't look as nice, and require more tweaking to get them to "publication quality". Octave includes a Qt-based GUI, but it is not nearly as polished as the Matlab GUI. Python is also just ok. You can use matplotlib[1] to create plots using an interface explicitly modeled on the Matlab interface, or use higher-level wrappers like Seaborn[2] which reduce the amount of work required to create nice-looking plots of certain types. "Zoom to different features" can be done via Pandas[3], or directly via NumPy, although the syntax can get a little cumbersome. The best Matlab-like GUI is probably "Scientific mode" in PyCharm[4], which requires a paid license. Jupyter notebooks[5] are a free option, but don't include all the features you'd have in a Matlab-style GUI. R is, in my opinion, best-in-class for exploratory data analysis. The combination of ggplot2[6] and dplyr[7] makes plotting, drill-down, aggregation, etc. easier than any other environment I've used. Chapters 2 and 4 of the free "R for Data Science" book[8] provide great examples of this. The RStudio[9] GUI is comparable to Matlab in features and overall polish, and it's available with either an AGPLv3 or commercial license. Jupyter notebooks also work. The major downside of R is that it's very optimized for interactive use, which makes deploying it to any sort of production environment tricky and error-prone. I'd mostly advise doing your ad hoc analysis in R, but rewriting things in another language if you want to deploy them. The other downside is that all the major deep learning libraries use Python, so if you want to do work in that space you should really just use Python. [1] https://matplotlib.org/ https://matplotlib.org/ [2] https://seaborn.pydata.org/ https://seaborn.pydata.org/ [3] https://pandas.pydata.org/docs/user_guide/indexing.html https://pandas.pydata.org/docs/user_guide/indexing.html [4] https://www.jetbrains.com/help/pycharm/matplotlib-support.html#scientific-project https://www.jetbrains.com/help/pycharm/matplotlib-support.ht... [5] https://jupyter-notebook.readthedocs.io/en/stable/notebook.html https://jupyter-notebook.readthedocs.io/en/stable/notebook.h... [6] https://ggplot2.tidyverse.org/ https://ggplot2.tidyverse.org/ [7] https://dplyr.tidyverse.org/ https://dplyr.tidyverse.org/ [8] https://r4ds.had.co.nz/ https://r4ds.had.co.nz/ [9] https://rstudio.com/products/rstudio/ https://rstudio.com/products/rstudio/
- ljosifov 6y agoAfter using matlab full-time for ~15 years, as of recently I'm trying pandas/numpy/spyder because the colleagues are users. So to aid collaboration mainly, but also to try out the environment - I was curious. In matlab matrices (arrays) are 1st class citizens of the language, so having them be just another set of objects with some libraries operating on them - that feels like a step back to me. Quite a few things easy in matlab, I find less-than-easy in pandas. Hope it will get better in time. I was hoping to move from matlab to julia, but noone else I know uses it. (I do quant trading)
- f6v 6y agoMultidimensional arrays are first class in Julia. Just add Linear Algebra package and you’re all set.
- ljosifov 6y agoWould like to try it at some point. I am trying pandas now b/c other people are using it. So far - the more I learn pandas, the less I like it. Not a good sign. I keep finding things that annoy me in pandas, b/c have seen them solved in array languages (like q/kdb) and matlab.
- f6v 6y agoYeah Julia is more popular in research than in industry. Python dominates data science field, but I as well find pandas and other tools too clunky.
- ojnabieoot 6y agoIn practice it seems like Octave isn’t a great alternative to MATLAB in industry because so many industrial customers use proprietary MathWorks packages (eg Simulink) that are missing in Octave. The fundamental problem is MATLAB/Octave simply aren’t as useful as Python for real world stuff (a bit of syntactical awkwardness around linear algebra is worth painless web access and system IO). The languages also aren’t as nice as R for statistics and machine learning. And nowadays they don’t have much performance benefit either. In most cases I think Octave/MATLAB provide too little benefit and too many drawbacks. Octave is a great option as a personal calculator, and be the best option for small mechanical/electrical engineering firms. MATLAB code is unusually clear and expressive for numerical calculus and linear algebra, so are a good choice for problem domains where the math is very complicated but the dataset isn’t terribly large (e.g., models of crack formation in ceramics). I worked at a place that used Octave to run a free MATLAB script that did some very complicated microeconomics: a lot of very smart professors have written many useful algorithms in MATLAB, so being able to run them without porting is nice. But I think Python and R have, sadly, made MATLAB as a language mostly obsolete for future development. The real relevance is MATLAB as an analysis tool with lots of MathWorks goodies.
- kxyvr 6y agoI work with folks in electrical controls and there's still a fair amount of modeling in Simulink. Although Octave doesn't replicate Simulink, a good amount of code is still in MATLAB. For me, I own both a MATLAB license as well as use Octave. Personally, I find Octave easier to work with than MATLAB when developing applications because (1) It avoids the often times broken license manager and starts faster and (2) Has a more reasonable, integrated connection to the machine C compiler for debugging mex files. Especially for reason (1), my clients also prefer to use Octave when possible. That said, we often need to do production runs in MATLAB because they tend to use more updated numerical libraries than Octave. For example, Octave still has not migrated to SPQR from CSparse. All that said, Octave has provided us with an amazing, reliable tool. It is not well suited for everything. It is incredibly well suited for implementing and rapid prototyping many kinds of numerical algorithms that take advantage of the ease of access to linear algebra operations.
- deleted 6y ago[deleted]