I have browsed through /usr/share/doc/octave2.9-doc/octave.pdf which is
the octave manual shipped with debian unstable octave 2.9 packages. This manual seems to be written in Feb 1997. Have there been no changes done to octave since then? or was this document just not updated with the latest changes? In the case of the later, Is there any latest documentation available (except other than reading the source code)? thanks raju -- Kamaraju S Kusumanchi http://www.people.cornell.edu/pages/kk288/ http://malayamaarutham.blogspot.com/ ------------------------------------------------------------- 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 ------------------------------------------------------------- |
kamaraju kusumanchi wrote:
> I have browsed through /usr/share/doc/octave2.9-doc/octave.pdf which > is the octave manual shipped with debian unstable octave 2.9 packages. > > This manual seems to be written in Feb 1997. Have there been no > changes done to octave since then? or was this document just not > updated with the latest changes? > > In the case of the later, Is there any latest documentation available > (except other than reading the source code)? > > thanks > raju > What should be the extension of octave files when the octave programs are not compatible with matlab? Should it always be .m or can it be something else? For example, in matlab the function definitions look like function name body end where as in octave the definitions look like function name body endfunction which does not work in matlab. any ideas? thanks raju -- Kamaraju S Kusumanchi http://www.people.cornell.edu/pages/kk288/ http://malayamaarutham.blogspot.com/ ------------------------------------------------------------- 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 ------------------------------------------------------------- |
On 2/27/06, kamaraju kusumanchi <[hidden email]> wrote:
> What should be the extension of octave files when the octave programs > are not compatible with matlab? Should it always be .m or can it be > something else? > > For example, in matlab the function definitions look like > > function name > body > end Your example above works in Octave. The "end" is optional in Octave (and Matlab). So this works too function name body Or you can use endfunction if you like. ------------------------------------------------------------- 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 ------------------------------------------------------------- |
In reply to this post by kamaraju
kamaraju kusumanchi wrote:
> kamaraju kusumanchi wrote: > >> I have browsed through /usr/share/doc/octave2.9-doc/octave.pdf which >> is the octave manual shipped with debian unstable octave 2.9 packages. >> >> This manual seems to be written in Feb 1997. Have there been no >> changes done to octave since then? or was this document just not >> updated with the latest changes? >> >> In the case of the later, Is there any latest documentation available >> (except other than reading the source code)? >> >> thanks >> raju >> > Sorry I forgot to ask the actual question I started out with. > > What should be the extension of octave files when the octave programs > are not compatible with matlab? Should it always be .m or can it be > something else? > > For example, in matlab the function definitions look like > > function name > body > end > > where as in octave the definitions look like > > function name > body > endfunction > > which does not work in matlab. You can still use the Matlab syntax in Octave. Octave still only recognizes .m as the file extension for script files and functions, so if you want your m files to be compatible with both environments, make sure you use the correct Matlab syntax. Yes, it is possible to create Matlab-incompatible m files that will run in Octave. -Quentin ------------------------------------------------------------- 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 ------------------------------------------------------------- |
In reply to this post by kamaraju
>> Sorry I forgot to ask the actual question I started out with. >> >> What should be the extension of octave files when the octave programs >> are not compatible with matlab? Should it always be .m or can it be >> something else? >> >> For example, in matlab the function definitions look like >> >> function name >> body >> end >> > > The above syntax works just fine in Octave. In fact, I'd encourage you > to use that syntax unless there's a good reason not to. This way, your > code is easier to port back to Matlab when the need arises. I provided the above case just as an example. But everyone is picking out on the example rather than on my actual question. May be it is in the way I phrased the question. Is there any separate extension that should be given to octave files which are incompatible with matlab files? It makes sense to have a .m extension if the octave file is compatible with matlab. But if it is incompatible what is the point of having a .m extension? We might as well have a octave specific extension say .oct indicating outright that the file is incompatible with matlab. raju -- Kamaraju S Kusumanchi http://www.people.cornell.edu/pages/kk288/ http://malayamaarutham.blogspot.com/ ------------------------------------------------------------- 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 ------------------------------------------------------------- |
On Mon, 27 Feb 2006, kamaraju kusumanchi wrote:
> I provided the above case just as an example. But everyone is picking > out on the example rather than on my actual question. May be it is in > the way I phrased the question. > > Is there any separate extension that should be given to octave files > which are incompatible with matlab files? > > It makes sense to have a .m extension if the octave file is compatible > with matlab. But if it is incompatible what is the point of having a .m > extension? We might as well have a octave specific extension say .oct > indicating outright that the file is incompatible with matlab. .oct is actually for compiled Octave functions. There is no different, octave specific, extension. I think that it would just add to confusion since they are mostly compatible, and the incompatibilities run both ways. Bill -- "Specialization is for insects." -- Robert A. Heinlein ------------------------------------------------------------- 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 ------------------------------------------------------------- |
Bill Denney wrote:
> On Mon, 27 Feb 2006, kamaraju kusumanchi wrote: > >> I provided the above case just as an example. But everyone is picking >> out on the example rather than on my actual question. May be it is in >> the way I phrased the question. >> >> Is there any separate extension that should be given to octave files >> which are incompatible with matlab files? >> >> It makes sense to have a .m extension if the octave file is >> compatible with matlab. But if it is incompatible what is the point >> of having a .m extension? We might as well have a octave specific >> extension say .oct indicating outright that the file is incompatible >> with matlab. > > > .oct is actually for compiled Octave functions. There is no > different, octave specific, extension. I think that it would just add > to confusion since they are mostly compatible, and the > incompatibilities run both ways. > > Bill > that .oct is already used for something else. But some such extension would really be useful from an editor point of view. For example, if you were a vim developer and you see a .m file, should the syntax highlighting correspond to that of matlab or should it correspond to octave? What do other editors like emacs etc., do in these cases? thanks raju -- Kamaraju S Kusumanchi http://www.people.cornell.edu/pages/kk288/ http://malayamaarutham.blogspot.com/ ------------------------------------------------------------- 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 ------------------------------------------------------------- |
On 27-Feb-2006, kamaraju kusumanchi wrote:
| For example, if you were a vim developer and you see a .m file, should | the syntax highlighting correspond to that of matlab or should it | correspond to octave? What do other editors like emacs etc., do in these | cases? By default, Emacs starts the Objective C mode for .m files, but you can specify your own default. You can also tell it what mode to open by using a tag like ### -*- octave -*- or by using local variables ### Local Variables: *** ### mode: octave ### End: *** You could also have Emacs start a special mode for all .m files that looks at the contents of the file and decides which actual mode to use. jwe ------------------------------------------------------------- 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 ------------------------------------------------------------- |
In reply to this post by kamaraju
that .oct is already used for something else. But some such extension would really be useful from an editor point of view. For example, if you were a vim developer and you see a .m file, should the syntax highlighting correspond to that of matlab or should it correspond to octave? What do other editors like emacs etc., do in these cases? It seems to me that you are trying to introduce a distinction where there shouldn't be one. It is true that there are minor syntactical differences between Octave and the other leading brand. Note, however, that this is not an Octave-vs.-Matlab problem: even if you exclusively used just one of them, you still could write code in a particular flavor. For example if you are using Matlab nestable block comments: %{ block commented text %} your code is incompatible with earlier Matlab and highlighting code editors. Would you propose to have a separate Matlab file extension for this case, as well? I think a better approach is to deal with differences: fix the highlighting so that it recognizes syntax flavors; decide which syntax you use in your files; agree to use the newest versions; finally, write conditional code that runs different branches after detecting which interpreter it's running in. ------------------------------------------------------------- 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 ------------------------------------------------------------- |
Hi everyone,
another question: Is there a recommended extension for octave data files (in the octave ascii format)? regards Thorsten Meyer ------------------------------------------------------------- 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 ------------------------------------------------------------- |
I wondered about this, too, and came up with my own naming convention.
For ascii octave data files, I use ".odat", i.e. "octave data". For binary octave data files, I use ".obd", i.e. "octave binary data". Jonathan Thorsten Meyer wrote: > Hi everyone, > > another question: > Is there a recommended extension for octave data files (in the octave > ascii format)? > > regards > > Thorsten Meyer > > > > ------------------------------------------------------------- > 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 ------------------------------------------------------------- |
Powered by Nabble | Edit this page |