help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave to matlab conversion


From: Ron Crummett
Subject: Re: octave to matlab conversion
Date: Thu, 06 Oct 2005 15:30:30 -0700
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050716)

It probably is a shame that price is a driving force in motivating many people, including myself, to use Octave over Matlab.  But the fact remains that people are choosing it for this very reason.  Me personally, I use the student version of Matlab (I am a grad student at the University of Idaho) because when I go to class, my teachers all explain how to do things in Matlab.  So my use of Octave comes down to two points:

-I don't have the money to throw down on all the several Matlab toolboxes I would need
-I don't have the time to learn some of the finer points of Octave, especially when I know how to do something in Matlab.

I think Octave is a fine product.  I like using it, though I sometimes get messed up by GNUPlot and completely agree with all proponents of a GUI.  But right now I know Matlab and need to conserve some time by sticking with it.

Ron

Søren Hauberg wrote:
tor, 06 10 2005 kl. 16:51 -0400, skrev Ben Barrowes:
  
Does anyone have a handy piece of code to convert octave-style m-files to matlab-style
m-files?
    
I haven't used it, but there's an oct2mat on the octave-forge site. 
The link is http://octave.sourceforge.net/oct2mat.tar.gz

  
This is becoming relevant as octave's source is many times used in a matlab setting when one
does not want to buy ML toolboxes, case in point, the statistics or signal processing
toolboxes. Or at times when octave-style source is better/more available than the
corresponding ML source.
    
It's great that people want to use octave, but it's really a shame if
price is the driving force. Octave should be used, because you can't (or
at least shouldn't) do science when working on a "black-box" system like
matlab. So please tell people to use octave because of the freedom and
because of the price. At least that's my opinion.

  
This converter does not need to be very complicated... I am thinking of the obvious things 
# => %
! => ~
endfunction => end
    
I think (haven't used matlab in a long time) you can't end a function in
matlab with a keyword, only end-of-file, or a new function.

[snip]
  
BTW, is there any reason that these different conventions were adopted aside from stylistic
considerations? The endfunction and its cousins (endofr, etc.) are more explicit and
understandable, but why a new comment character?
    
I don't know the reason, but it might be related to # being the standard
shell script comment. With octave supporting comments beginning with #,
it is possible to create an octave script that can be launched from the
terminal, by setting the she-bang (I think that's what it's called) to
#!/usr/bin/octave

/Søren



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

  

------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]