From Matlab to Octave
Jordi Gutiérrez Hermoso
jordigh at gmail.com
Tue May 6 11:38:34 CDT 2008
On 05/05/2008, D. Hartog <d.hartog at student.rug.nl> wrote:
> I am trying to switch from Matlab to Octave....
Nice!
> Do you use emacs as editor?
That's a religious issue, to which I feel categorically obligated to
respond "yes". ;-)
If you are scared by too much text, (or worse, The Black Screen Of
Doom, a.k.a. a terminal) you might prefer to use QtOctave, also
packaged for Debian. I don't personally see the benefit of QtOctave
over the thermonuclear text editor (Emacs), except that it makes
things look prettier and more bubbly (but if eye candy is what you
want, Emacs can be made to look pretty too).
> Where can I find useful information about switching from Matlab to
> Octave or do you have some advice for me?
It's a little hard to say... Octave's eventual goal is 100% Matlab
compatibility these days, and it's achieved here and there. Try to
treat Octave as if it were Matlab. If you run into problems, let us
know, and we'll try to help.
A somewhat common first problem that Matlab converts face in Octave is
that unvectorised code suffers more of a performance penalty in Octave
than in Matlab. The current fix is to write better Octave code. ;-)
Oh, and you might also want to use the syntax enhancements that Octave
uses. C-like operators *=, /=, +=, and ++ exist in Octave, as do more
descriptive block-closing statements (endfor instead of plain end),
and # for comments like all other scripting languages use, instead of
Matlab's quaint %.
Good luck,
- Jordi G. H.
More information about the Help-octave
mailing list