[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave libs and builtin functions
From: |
Erich Schneider |
Subject: |
Re: octave libs and builtin functions |
Date: |
Mon, 08 Jun 98 13:45:13 |
On Thu, 4 Jun 1998 10:21:05 -0500 (CDT), John W. Eaton wrote:
>On 27-May-1998, Erich Schneider <address@hidden> wrote:
>
>| I'm already using the octave classes in my own C++ applications.
>| However, I don't quite understand how to use octave's builtin functions
>| like load, save or plot. I have problems in understanding what the
>| DEFUN_TEXT macros are doing. I cannot see that the functions defined by
>| these macros are exported. Does anybody have an example for using
>| octave builtin functions or saving, loading and plotting octave
>| variables in the mat format?
>
>The DEFUN macros provide the function declarations and enforce a
>uniform naming scheme for built in and dynamically loaded functions.
> ...
>If you create the argument list yourself, you can call the function
>Ffoo:
>
> octave_value_list args;
>
> args(2) = ...
> args(1) = ...
> args(0) = ...
>
> octave_value_list retval = Ffoo (args, nargout);
Thank you very much for the answer. I've done that with the save
function: Fsave( args, nargout ). However, the linker cannot resolve
the reference Fsave, since the shared libs don't seem to export these
functions.
>However, the functions defined by the DEFUN macros are really only
>intended to be called from functions that are running inside of
>Octave. They are not particularly useful (and some would not even
>make sense) in standalone C++ programs.
Loading and saving e.g. mat files makes sense in a data aquisition
program which uses the Matrix classes for simple transformations and
storing the data. Plotting a matrix makes sense if there is a need for
controlling the results of an experiment. Doing this from a C++
application would be very comfortable. The analysis is of course better
done in octave.
I still don't understand how octave uses a builtin function like
Fsave() if these functions are not exported. They are not contained in
an imp file I generate from the shared libs. I would really appreciate
some help on this matter.
Thank you very much,
Erich Schneider
----------------------------------------------------------------------
Erich Schneider, Dipl.-Phys. | address@hidden
Neurologische Forschung | address@hidden
Ludwig-Maximilians-Universit"at |
Klinikum Grosshadern, M"unchen | Fax: +49,89,70906,101