Hacker News new | ask | show | jobs
by joelthelion 3634 days ago
I don't get why people are still advocating Octave as a Matlab alternative.

The real alternative is Python + Scipy. It's A LOT better than Matlab. Depending on your application domain, you might also want to look at R or Julia.

3 comments

> I don't get why people are still advocating Octave as a Matlab alternative.

Because it is the closest thing to a drop in replacement, which is what you need when taking a class or following a tutorial based on MATLAB. Trying to use a different language and follow along is a much more advanced challenge and can be borderline impossible for a MOOC with an autograder or a class with a dusty professor.

I wasn't very happy with octave and I wouldn't use it for an independent project.. but I can't say how much of that is the pesky little octave specific bugs and how much is that I wouldn't like MATLAB's syntax when it is perfectly implemented. I suppose I could make the same criticisms of R as much of its frustratingly odd behavior comes from its history in emulating an old proprietary language's syntax..

I did take a class which worked with MATLAB and was using Octave to develop for it.

Well, and I guess it already says enough that I actually had MATLAB installed, but still preferred using Octave.

Just the minor annoyances in MATLAB like it taking probably a minute to start up, being in general really sluggish and having an annoying (read: not particularly bash-like) command-line were already enough to make up for the just as minor compatibility-problems I occasionally had to correct before handing in.

So, at least up until the stuff that you can get to in one semester, the compatibility was pretty good and I only really once had a problem which couldn't be fixed by a simple find+replace.

And in that case, it was actually something where I didn't understand why it didn't work in MATLAB (if I remember correctly, you for some reason couldn't use `hold on/off` with multiple `ezplot`-instructions in it).

So, yeah, I don't think at all that it was Octave-specific bugs bugging you, especially also because the MATLAB-syntax is actually even more annoying than Octave's.

>I did take a class which worked with MATLAB and was using Octave to develop for it.

Well, and I guess it already says enough that I actually had MATLAB installed, but still preferred using Octave.

That is exactly what happened with me. And then we started doing more advanced stuff next semester and Octave fell flat on it's face.

It's been a long time since I've used Matlab (it was for a diff eq class), but isn't R, with vectors as its primary datatype, much more similar to Matlab than Scipy? Not that Scipy or Pandas is bad, but they have to work quite hard around the fundamentals of Python's syntax to emulate the same behavior of R/MATLAB.
I don't think this is the case. Most of numpy, which powers the vectorized operations that the rest of the scientific stack uses, is written in C anyway. The python part is simple, just python bindings to the C functions.

The matlab-like syntax for getting slices of arrays is the only really non-pythonic thing I can think of.

Genuine question: What do you use it for?