embedding octave - passing variables and take them back
Marco Driusso
marcodriusso at gmail.com
Mon Mar 9 09:20:58 CDT 2009
Hello,
I'm trying to embed the octave interpreter into a c++ program, following the
octave_embed.tar.gz example (http://wiki.octave.org/wiki.pl?OctaveEmbedded).
In this example is explained how to call functions and scripts but not how
to pass variables from the c++ ambient to the octave workspace.
The only solutions I've founded are:
1) transform my c++ double arrays to strings and then evaluate them, to pass
variables from c++ to octave;
2) save the elaborated variable into a file with the option save(-ascii,..)
and read it from the c++ ambient, to pass variables from octave to my c++
program;
but this is not a good solution.
In the help-octave archivie I've founded something like using
symbol_table::varref
but I don't understand what I've to do.
Could someone explain me how I can push a variable to octave and also get
an octave variable back?
Would be enough to show me how to put a dobule array
double a[length]
in the octave workspace, and how to take back an octave variable to the c++
ambient.
Thanks!
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090309/b61825cc/attachment.html
More information about the Help-octave
mailing list