help-octave
[Top][All Lists]
Advanced

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

Calling other functions from .oct files


From: John W. Eaton
Subject: Calling other functions from .oct files
Date: Wed, 30 Apr 2003 22:38:06 -0500

On 30-Apr-2003, Peter Williams <address@hidden> wrote:

|       I'm starting to do some work with .oct files and I need a little 
| guidance.  The classes and structures document is very useful, but 
| what I want to do is call functions that I would normally use in a .m 
| from my C++ code.  I'm not really sure how to go about this, or where 
| to look in the source for examples.
|       If someone could point me in the right direction or give me a brief 
| example of how you would call "randn" from C++ source.

Generally, you would want to use feval.  It works the same whether the
function you want to call is defined in a .m or .oct file.

But for the specific case of rand, you can now (as of 2.1.46) use the
octave_rand class declared in oct-rand.h.

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
-------------------------------------------------------------



reply via email to

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