Live data from Hacker News

Matlab is oversold as a general-purpose language

abandonmatlab.wordpress.com

81–90 of 104 posts

Re: Matlab is oversold as a general-purpose language

#81
post #53

Earlier quoted context omitted.

As someone who loves Matlab but would rather use a free-software solution, I must say that Octave is not an effective replacement for Matlab. Matlab itself is just so much more feature-complete and polished, turning to Octave feels like going back two decades in technology.

In what way is Matlab more feature-complete and polished? With respect to just the actual language Octave is nearly a 1:1 implementation of Matlab, which is an primary goal to stride for and maintain, any differences between the two is considered a bug even.

Matlab is much faster. For a sense of scale, a relatively simple image processing script ran 125 times faster in Matlab than Octave. This is, most likely, because Matlab has a better code optimizer.

I don't see a compelling reason to use Octave unless you're trying to avoid paying for a Matlab license. If you're going to switch tools, why not switch to NumPy/SciPy and get the advantage of using a full-featured programming language?

Re: Matlab is oversold as a general-purpose language

#82
post #77
post #64

Earlier quoted context omitted.

Graphics in general, handle graphics in particular, and no I'm not kidding. OOP for visualization can't be beat.

So a specific graphics toolkit then? Is it one that is included with Matlab or another toolkit that is necessary to pay in addition for?

Matlab is usually run as an ide with an interactive window (command line interpreter). Graphics are built in and interactive, you can interact with any number of graphics windows and with the command line at the same time (this is difficult to do in python numpy and matplotlib), and you can tweak the graphics windows from the command line to add GUI buttons, boxes, etc. This all comes built in to the most basic MATLAB commercial offering.

Re: Matlab is oversold as a general-purpose language

#83
post #75
post #9

Okay, I'll bite on this one. I used matlab quite extensively (for years) in the medical imaging field, as well as other miscellaneous engineering (read: electronics, modeling, FEA. Not web apps) disciplines. I noticed several things about the matlab culture: - In academia, people really do not seem to give a fuck about using the right tool for the job. I used to try to explain to the people in my lab why their softwa…

I more often see the opposite problem in CS academia. People care too much about what tool is best for a job, and as a result nothing is easily interoperable. One grad student writes stuff in Haskell, another one uses OCaml, a third does everything in Python, a fourth uses Common Lisp, and you're lucky if a fifth doesn't use his custom, self-maintained Scheme dialect that he swears is perfectly adapted to the job. I'…

Are you in CS, by chance? ;-) I think the frequency of people who can even comprehend haskell drops off significantly once you walk over to the chemistry building.

That said, I'm not against a uniform environment; there are definitely advantages to having everyone on the same platform. I would just prefer we all piled into a greyhound bus instead of a retrofitted rail carriage powered by a pack of dogs.

Re: Matlab is oversold as a general-purpose language

#84

Earlier quoted context omitted.

The thing is it isn't just about solving their problems. The tough thing is to convince them how much it would help the community as a whole. I have tried many times to download some PhDs code and attempt to get it to compile. Usually it can be done after a lot of effort and tweaking. But it would be beneficial for science if code was treated as important as the paper itself.

> But it would be beneficial for science if code was treated as important as the paper itself. One could argue that it isn't. In science, the concept is usually more important than the implementation. But I totally agree. Scientific code tends to be awful and I wish I knew what to do about that.

That is one point of view. Another is that the entire scientific community is entitled to peer review your work, and you should enable them to. Not just your referees, who will likely not compile and test your code, anyhow.

The concept may be the most important thing, but what good is a paper asserting some new concept if everyone can't verify it? I think it is the approach that folks like Fernando Perez at ipython are pushing with their html notebooks. Reproducible, comprehensible science.

Re: Matlab is oversold as a general-purpose language

#85

Earlier quoted context omitted.

And that's the thing with Matlab, it does the math part really well Maybe R and Numpy are getting better, but try to invert a matrix, find and eigenvalue, find the solution to a polynomial, fit an equation, etc Not to mention the most advanced things outside Matlab

You mean like this? http://docs.scipy.org/doc/numpy/reference/routines.linalg.ht...

Yes, as I said, it's getting better.

Simulink is a whole different world inside Matlab as well

Here's something that doesn't look like it's covered by NumPy 100% http://www.mathworks.de/de/help/signal/ug/iir-filter-design....

Re: Matlab is oversold as a general-purpose language

#86

Earlier quoted context omitted.

We don't use simulink or anything like that - we just use the typical linear algebra stuff: Markov chains, finding eigenvalues, solving linear systems, etc.

And that's the thing with Matlab, it does the math part really well Maybe R and Numpy are getting better, but try to invert a matrix, find and eigenvalue, find the solution to a polynomial, fit an equation, etc Not to mention the most advanced things outside Matlab

Well, matlab--ahem, matrix lab--does certain bits of math quite well. But I would say that R/numpy are most than just 'getting better'. They literally do every thing you just mentioned, and typically their implementations go beyond matlab's.

Where I've found matlab to still be ahead is in the area of domain specific engineering. For example, if you want to manually pulse code a signal using some specific modulation scheme, matlab has a tool for just that. In python you still have to manually write a bit, interface it to the fitting routine, and convolve it across your signal.

Re: Matlab is oversold as a general-purpose language

#87
post #81
post #53

Earlier quoted context omitted.

In what way is Matlab more feature-complete and polished? With respect to just the actual language Octave is nearly a 1:1 implementation of Matlab, which is an primary goal to stride for and maintain, any differences between the two is considered a bug even.

Matlab is much faster. For a sense of scale, a relatively simple image processing script ran 125 times faster in Matlab than Octave. This is, most likely, because Matlab has a better code optimizer. I don't see a compelling reason to use Octave unless you're trying to avoid paying for a Matlab license. If you're going to switch tools, why not switch to NumPy/SciPy and get the advantage of using a full-featured progra…

The "code optimiser" you're talking about is "just" a JIT compiler. Loops in Octave are slow. They were slow in Matlab too, but then they got a JIT compiler.

We're currently working on a getting a JIT compiler into Octave too. Here are two GSoC blogs about it:

    http://octave-jitc.blogspot.ca/
    http://jit-octave.blogspot.ca/

Re: Matlab is oversold as a general-purpose language

#88
post #62

Earlier quoted context omitted.

I've had an unfortunate opportunity to have to help out a cousin's girlfriend with python. She's studying informatics and it's their introductory course in programming (recently switched from pascal). But python has really too many abstract constructs to explain easily. One example they had was using the for loop. I don't know python, but from the examples and exercises the professor gave them, it doesn't seem to hav…

Totally agree. I learned C first, then C++. I wouldn't have it any other way. The top-down approach means you truly understand nothing until a year or so down the line. The bottom up approach lets you fully grasp the small world you've been exposed to. And as more concepts are introduced your world expands. At no point are you just left wondering WTF are these magic keywords doing.

> The top-down approach means you truly understand nothing until a year or so down the line.

Is that really true? I think my language ordering went something like: qbasic, perl, visual basic, python/c, php,, more c, c++,

So strictly speaking it was at least a year or two before I learned C for the first time. However, while I certainly wasn't as well informed as I am now, I wasn't completely clueless. I knew that the things I was doing in perl were actually allocating memory, that perl was helping me with lots of book keeping, that there were things called pointers that pointed to things, etc.

I might not have actually worked in detail with the concepts yet, but I did have an idea that there was something below what I was working with. I think that by bearing that in mind, I was able to 1) know that I would have to learn the 'hardcore' stuff eventually and 2) focus on the actual programming, in the sense of making the computer do what I wanted.

Re: Matlab is oversold as a general-purpose language

#89
post #47

It's strange there're no single comment about Octave — http://www.gnu.org/software/octave/ It's free software and the language is 99% compatible with Matlab. Edit: and yes, Matlab is not intended for any generalisation/abstraction. It's a big scientific calculator with REPL. And complicated program in it still feels like big calculator

As someone who loves Matlab but would rather use a free-software solution, I must say that Octave is not an effective replacement for Matlab. Matlab itself is just so much more feature-complete and polished, turning to Octave feels like going back two decades in technology.

We're actually pretty feature complete wrt Matlab. The biggest things that are missing are the GUI, classdef OOP, and a JIT compiler. All of these currently have very lively and active development. Hopefully our next Octave release will seem less archaic to you.

The language itself is very feature complete, however. Our main current goal has been for you to be able to grab your Matlab code and run it without modification in GNU Octave. For 99.9% of the lines of code in your code (assuming you don't use classdef), this works. The problem is that you might not always want to modify the remaining 0.1% lines of code to make them run in GNU Octave.

Re: Matlab is oversold as a general-purpose language

#90
post #64
post #53

Earlier quoted context omitted.

In what way is Matlab more feature-complete and polished? With respect to just the actual language Octave is nearly a 1:1 implementation of Matlab, which is an primary goal to stride for and maintain, any differences between the two is considered a bug even.

Graphics in general, handle graphics in particular, and no I'm not kidding. OOP for visualization can't be beat.

Octave has handle graphics and almost all of the handle graphics properties that Matlab has. Do help us record which particular bits of handle graphics you're missing. It helps us to have a list of what's missing.
Post reply on HN