Live data from Hacker News

A new release for GNU Octave

lwn.net

21–30 of 99 posts

Re: A new release for GNU Octave

#21

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’m curious, not saying either option is bad.

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…

I would actually say Python's matrix manipulation syntax is better, but Matlab's matrix literal syntax is much nicer and more minimal.

Having made hundreds/thousands of plots in each, I think Matplotlib's plotting is a bit better than Matlab's, especially for complex plots where you need control and have subfigures, etc. Matlab's 3D plots are better than Matplotlib's (which are fake-3D), but for sophisticated 3D visualisation Python has powerful options like VTK that Matlab can't really match.

Re: A new release for GNU Octave

#22

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’m curious, not saying either option is bad.

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.

Re: A new release for GNU Octave

#23
post #13

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’m curious, not saying either option is bad.

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 broa…

I wonder how much of this is due to the availability of the dot-operator syntax beside the extensive libraries and the easy extensibility (just create a new function in the Matlab search path and Bob's your uncle - no further installation or registration rituals needed).

Re: A new release for GNU Octave

#24
post #19

Earlier quoted context omitted.

Yes, there are many good alternatives. Seaborn, Plotly, and many more. I still use Matplotlib for most things (with the OO API), as I can control its fine details and it's more versatile. For non-graph visual things that I could use Matplotlib for, I've been generating SVGs and displaying them directly in Jupyter notebooks (with Cairo is one option, but just directly is pretty easy too).

Sure, but none of these beats gnuplot's uber-elegant "plot sin(x)" syntax :)

Sympy can do that: plot(sin(x))

This of course works with other symbolic manipulation:

  plot(sin(x).diff())
  plot(sin(x).subs(x, x**2))

Re: A new release for GNU Octave

#25
post #17

Earlier quoted context omitted.

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…

> how much better MATLAB is at plotting than Python or Octave (or Julia). To make sure I’m understanding you correctly, you’re saying Matlab is much better at plotting than Octave? I’ve only ever used the latter, so I guess that would be one reason to consider switching to the former.

Last time I tried a few years ago, Octave couldn't hold a candle to Matlab's plotting functions. It's a different league.

Re: A new release for GNU Octave

#26
post #24

Earlier quoted context omitted.

Sure, but none of these beats gnuplot's uber-elegant "plot sin(x)" syntax :)

Sympy can do that: plot(sin(x)) This of course works with other symbolic manipulation: plot(sin(x).diff()) plot(sin(x).subs(x, x**2))

Can you show the complete code for these snippets to work? I tried

    import sympy
    sympy.plot(sympy.sin(x))
and it says "NameError: name 'x' is not defined"

Re: A new release for GNU Octave

#27
post #24

Earlier quoted context omitted.

Sympy can do that: plot(sin(x)) This of course works with other symbolic manipulation: plot(sin(x).diff()) plot(sin(x).subs(x, x**2))

Can you show the complete code for these snippets to work? I tried import sympy sympy.plot(sympy.sin(x)) and it says "NameError: name 'x' is not defined"

You need to tell Python that you want a symbolic variable named x:

  from sympy import *
  x = symbols('x')
  plot(sin(x))
symbols is sympy.symbols.

Re: A new release for GNU Octave

#28

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’m curious, not saying either option is bad.

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.

Re: A new release for GNU Octave

#29

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’m curious, not saying either option is bad.

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…

I really like matplotlib: while it is not intuitive and the documentation is sometimes lacking, there are a lot of examples online and stackoverflow answers all my questions.

That said I may use matplotlib much less than you do (I used it a lot when I was a student, now maybe 6 times a year).

Re: A new release for GNU Octave

#30
post #25
post #17

Earlier quoted context omitted.

> how much better MATLAB is at plotting than Python or Octave (or Julia). To make sure I’m understanding you correctly, you’re saying Matlab is much better at plotting than Octave? I’ve only ever used the latter, so I guess that would be one reason to consider switching to the former.

Last time I tried a few years ago, Octave couldn't hold a candle to Matlab's plotting functions. It's a different league.

Octave's plots are missing some property editor and GUI tools which can be quite annoying. Like the brush or regression tool.
Post reply on HN