
GNU Octave: A high-level interactive language for numerical computations [pdf] - mindcrime
https://octave.org/octave.pdf
======
wanderfowl
As somebody in an academic field where many scripts exist for MATLAB (mostly
digital signal processing focused), there are few projects I want to succeed
more than Octave.

It's very hard to recommend that students and colleagues grow invested in
toolchains involving proprietary software that they may not reliably be able
to afford/activate/use in the future, particularly when some students may end
up working in developing nations.

Here's hoping that someday, Octave does to MATLAB what R has done to SPSS and
SAS. MATLAB is a dinosaur deeply begging for an asteroid.

~~~
wjn0
> It's very hard to recommend that students and colleagues grow invested in
> toolchains involving proprietary software that they may not reliably be able
> to afford/activate/use in the future, particularly when some students may
> end up working in developing nations.

The future is here. As a research student in a developed nation, it's very
annoying to deal with MATLAB projects. Our lab has a fairly strict no-new-
code-written-in-MATLAB policy. Getting a personal licence is fairly
straightforward as a student (for now), but running it on a cluster, or
anything beyond my personal computer is very annoying.

~~~
IshKebab
What do you use instead though? Octave is very slow, Julia is even slower and
Numpy has an annoyingly verbose syntax because it has to be valid Python.

Additionally I've not found a plotting solution that is as robust and fast as
MATLAB.

MATLAB seems to me to be one of those commercial programs that has no good
FOSS alternatives. Maybe it's just too niche, like CAD and EDA.

~~~
cbkeller
> Julia is even slower

Huh? This has definitely not been my experience -- most of the things I've
ported over seem to run about twice as fast in Julia as in the original
vectorized Matlab (and probably more like 10x faster than naive non-vectorized
Matlab)..

~~~
IshKebab
It may execute faster when it finally gets around to it. But just loading the
plotting library (Gadfly) takes over 10 seconds!

[https://github.com/JuliaLang/julia/issues/4373](https://github.com/JuliaLang/julia/issues/4373)

Starting all of Matlab never took that long.

~~~
ChrisRackauckas
I don't know what version of MATLAB you're using :P. They definitely have
their logo screen open for a minute or two before the program shows up. That's
quite a long load time. They just made it pretty.

------
farmerjoe_eatat
I spent a few years writing software professionally, a large fraction of it in
MATLAB (engineering tools development for gas turbine companies). With every
project I lost more respect for matlab, which is very slow, and clunkier than
the marketing material would suggest (for instance, IPC. Or accidentally
passing a large data set to a vectorized O(n^2) operation). And they charge
you $20k/year for a single license!

I still have some old personal code left in matlab, and I have been using
octave a bit lately just to keep running it- I have to say I do appreciate
octave. My biggest complaint is how slow plotting is, for instance, I have a
method of characteristics supersonic nozzle design software based on the
modified Sauer method and methodology of Zucrow and Hoffman, that runs in a
couple seconds, but in octave it takes several minutes to plot no more than a
couple hundred lines (no, just straight lines with two points). What gives?

~~~
kxyvr
One thing that caught my eye was your $20k/year license fee for MATLAB. How
many toolboxes did you purchase?! I maintain a commercial license for a single
user and it's nowhere near that. I purchased a perpetual license originally:

[https://www.mathworks.com/pricing-
licensing.html](https://www.mathworks.com/pricing-licensing.html)

which is around $2k, but then pay a yearly maintenance fee to get upgrades,
which is vastly less.

~~~
4thaccount
Toolboxes are in the $5k range (to me that is crazy), so if you get the
database, optimization, and power systems toolbox with a license, you're not
far from $20k.

This is one reason why if I had to pick commercial software I would choose
Mathematica as they put everything in core as part of the standard license and
don't require toolboxes for something the default software should have.

------
std_throwawayay
I have used Matlab and GNU/Octave in parallel for some years half a decade
ago. Octave can do most things that I needed but was slower to run for many
things. With Octave you didn't run into licensing problems as those floating
licenses had their limits and sometimes I needed to run quite a few instances
in parallel.

Now I use Python exclusively. The language is so much better and more sane and
almost any library is available. I will never go back.

Today, I would recommend Matlab only in rare circumstances. Currently I cannot
think of one use case that I had in the last three years where I would prefer
Matlab to Python. Using the Matlab language with a portable Octave
installation can be useful for teaching matrix/vector topics to people who
have little programming experience and don't know Python. You can get results
very quickly. The syntax feels most natural for manipulating matrices and
everything seems to be a matrix.

Other than that I think the Matlab language and ecosystem is kind of a dead
end. But it will provide profits for a few more decades due to sheer inertia.

~~~
fiveFeet
^ This! Very similar experience here! Moved to Python from Matlab and never
looked back.

------
sitkack
What benefit does Octave have over the Python ecosystem? Esp as a clone of
proprietary software?

The only thing I can see is as a way of running Matlab codes in clusters on
cloud w/o having to also run the license servers.

~~~
kxyvr
I work as an applied mathematician writing numerical codes and I prefer to
prototype in MATLAB/Octave for a number of reasons:

1\. I believe it to be far easier to debug an algorithm in MATLAB/Octave than
Python. When I drop into the debugger, I can immediately check things like the
eigenvalues of a matrix with a simple "eig(A)" or look at the sparsity
visually with "spy(A)". Though this is possible in Python, I believe it to be
far easier in MATLAB/Octave because the core mathematical functions are
immediately available.

2\. MATLAB/Octave link into the good factorization codes directly and provide
license coverage in different ways. For example, both codes link into things
like SuiteSparse, which gives access to fast Choleski and QR factorizations.
These routines have different licenses, but the good ones are dual licensed
GPL/Commercial. Octave links into the code under GPL licensing. MATLAB
provides a commercial license. This means that I can give a customer
MATLAB/Octave code and they can choose whether or not they want license
coverage using MATLAB or to release the code under GPL and we don't run afoul
with the licenses. Candidly, not having to go off and obtain a second license
for SuiteSparse is nice.

3\. In my opinion, the C-API in MATLAB/Octave is more sane than Python. It's
not great, but the matrices are laid out in a rational method in
MATLAB/Octave, so it's really, really easy to link into an old C/C++ or
Fortran codes. Often, I've used this trick to debug the C/C++ code because I
can more quickly visualize the matrices in MATLAB/Octave than I can using the
native language.

As for the difference between MATLAB and Octave, I prefer Octave over MATLAB
since:

1\. Octave is more sane when dealing with the C-API. MATLAB is not bad, but it
can be finicky sometimes and I don't feel like I should have to manually set
dbmex on.

2\. Octave uses the system version of GCC and does not package it's own.
MATLAB does and for many years since MATLAB slow played their GCC version,
this was a major annoyance when linking to codes that used C++11/14\. MATLAB
has done a good job in the last few years of catching up, but I still prefer
to use the system compiler.

3\. There are bugs in some of the Octave packages. MATLAB tends to have fewer
such bugs. Most of the time, it doesn't matter till it does. Just file the bug
with Octave. They can be slow, but there are a lot of people who volunteer
their time and filing such bugs or helping to fix this is just the cost of
this kind of software.

And, look, if you like Python, great. I also work with Python. However, again,
for prototyping a technical algorithm, I prefer Octave.

~~~
GlenTheMachine
That’s a well thought out argument and I appreciate it.

I also use MATLAB/Octave quite a bit for numerical algorithm prototyping, and
mostly hate it. The language has a shallow learning curve, true, but for
complex software it gets ugly very fast. It’s just not a well designed
language, and if you have any CS background that becomes very limiting.

The thing that MATLAB brings to the table is the incredibly high quality
numerics toolboxes. Octave gets a few of those but far from all of them,
making it in my experience a poor runner up.

Whenever I have a choice I now go first to Julia. The language just makes me
happy and the numeric infrastructure is almost complete enough.

Except for something like Simulink. When you need Simulink, there’s nothing
else out there that’s a valid alternative.

~~~
kxyvr
For sure and I agree with many of the difficulties associated with
MATLAB/Octave. When I want to put together a more complete piece of software
that does things like: have a GUI, interact with a database, network
conductivity, or parse files, I think that MATLAB/Octave is a poor choice.

A language like Julia tries to bridge that gap. My problem with Julia is that
we don't get license coverage for things like SuiteSparse even with a JuliaPro
license. MATLAB has done a _fantastic_ job of dealing with this and is well
worth my license fee every year, so that my customers and I don't have to deal
with it. Till this changes, it's a nonstarter for me.

As far as the differences in packages between MATLAB and Octave, I'll contend
that it depends. For their lower level routines, they often use the _exact_
same codes. Both use ARPACK for iterate eigenvalue solving. Both use various
forms of SparseSuite, UMFPACK, LAPACK, and the like for their algebra. For me,
I tend to only use these lower level routines, so there's little or no
difference in performance or efficacy between the two. For the toolbox arena,
I know there are differences and I agree that can be frustrating. I suppose my
point is that it really depends where on the spectrum of lower level to higher
level mathematical abstractions that we need. For low level abstractions, I
feel that Octave works great and it's been a critical tool for me.

~~~
GlenTheMachine
In my situation (government scientist) I don’t have commercial customers and,
hence, not many licensing issues.

------
dwheeler
It's worth noting that the popular Coursera course "Machine Learning" taught
by Andrew Ng uses Octave as its tool. This is mentioned in the Octave book's
preface; see [https://www.coursera.org/learn/machine-
learning](https://www.coursera.org/learn/machine-learning) if you're
interested in the course itself. It is _possible_ to use MATLAB instead, but
there's often no real reason to do so. I think a lot of people have already
decided to use Octave instead, because it solves their problems just fine.

