[Top][All Lists]

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

embedding octave - passing variables and take them back

From: Marco Driusso
Subject: embedding octave - passing variables and take them back
Date: Mon, 9 Mar 2009 15:20:58 +0100

I'm trying to embed the octave interpreter into a c++ program, following the octave_embed.tar.gz example ( 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.


reply via email to

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