How does Octave shine?
Jordi Gutierrez Hermoso
jordigh at gmail.com
Wed Sep 20 17:16:30 CDT 2006
On 20/09/06, Cameron Laird <Cameron at phaseit.net> wrote:
> What shows Octave off to best advantage for a Matlab-using audience?
I can think of a couple of enhancements I particularly enjoy:
1) "Better" syntax. By this I generally mean that I find Octave just
slightly more readable in that allows for some mostly cosmetic
enhancements like endfunction, endfor, or endif instead of just a
2) Speed. Try tic-tocking some individual operations, single function
calls, preferrably ones already in the main 2.9 branch and not in the
'forge. Compare with Matlab. I found this way quite a few functions
that were individually faster than the competition, although most
people (myself included) usually immediately notice that Octave is
"slower" because it suffers more severely from unvectorised code like
Matlab once did.
3) Variety and interoperability. ImageMagick, the C++ coding, gnuplot,
PLPlot, Octaviz and the VTK functions, plus all the 'forge functions.
Graphics are always a good way to get people initially interested. If
you're doing a presentation, show 'em Octaviz. That always raises
eyebrows in my workplace.
4) Other cosmetic enhancements. I particularly like that output is
paged by default to less, instead of crapflooding my prompt if I
inadvertently page an excessive amount of output.
5) It works. It's possible to get work done with it, perhaps not
always exactly as you would do it with Matlab, but usually it does
work. And when it doesn't, there's an extremely helpful mailing list
The Octave FAQ, admittedly a bit old but still mostly relevant, has a
few more features tht could be good selling points, such as data
structures and the unwind-protect exception handling:
And I also think that freedom and community are huge reasons to use
GNU Octave. To quote from the TeXmacs documentation:
Why freedom is important for scientists
One major objective of TeXmacs is to promote the development of
free software for and by scientists, by significantly reducing the
cost of producing high quality user interfaces. If you plan to
write an interface between TeXmacs and other software, then please
As a mathematician, I am deeply convinced that only free programs
are acceptable from a scientific point of view. I see two main
reasons for this:
* A result computed by a ``mathematical'' system, whose source
* code is not public, can not be accepted as part of a
* mathematical proof. Just as a mathematician should be able
* to build theorems on top of other theorems, it should be
* possible to freely modify and release algorithms of
* mathematical software.
However, it is strange, and a shame, that the main mathematical
programs which are currently being used are proprietary. The main
reason for this is that mathematicians often do not consider
programming as a full scientific activity. Consequently, the
development of useful software is delegated to ``engineers'' and
the resulting programs are used as black boxes.
This subdivision of scientific activity is very artificial: it is
often very important from a scientific point of view to know what
there is in the black box. Inversely, deep scientific
understanding usually leads to the production of better
software. Consequently, I think that scientists should advocate
the development of software as a full scientific activity,
comparable to writing articles. Then it is clear too that such
software should be diffused in a way which is compatible with the
requirements of science: public availability, reproducibility and
1998--2002 Joris van der Hoeven
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.1 or any later version published by the Free Software
Foundation; with no Invariant Sections, with no Front-Cover Texts,
and with no Back-Cover Texts. A copy of the license is included in
the section entitled "GNU Free Documentation License".
- Jordi G. H.
More information about the Help-octave