help-octave
[Top][All Lists]
Advanced

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

Re: oct files


From: Daniel Kraft
Subject: Re: oct files
Date: Tue, 09 Jul 2013 11:47:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

Hi,

On 07/09/2013 11:36 AM, Deepak Bhatia wrote:
> We want to write the C++ Code and then make it through mkoctfile to be
> .oct file. How do we run the .oct file in octave ?

basically the same rules apply as with ordinary .m files:  Ideally you
should name your .oct file by the same name as your function (foo.oct
containing the function foo), then simply call it as "foo" or "foo (42)"
from Octave and the .oct file will be loaded and executed.

See also the manual at [1].

  [1]
https://www.gnu.org/software/octave/doc/interpreter/Oct_002dFiles.html#Oct_002dFiles

BTW, I think especially when using compiled C++ code, it was a good
choice to use GNU Octave over some well-known competitor product (if you
didn't already make the choice because of freedom and price).  IMHO,
.oct files are much easier to code and maintain than .mex files.  I
regularly hear from collegues using Matlab that .mex files are very
painful and complicated to work with -- I myself have never really had
any issues with writing .oct files and regularly do that for performance
reasons.

Good luck!  Cheers,
Daniel

-- 
http://www.domob.eu/
--
Done:  Arc-Bar-Cav-Hea-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Mon-Pri


reply via email to

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