help-octave
[Top][All Lists]
Advanced

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

Re: passing global variables when embedding octave


From: Soeren Sonnenburg
Subject: Re: passing global variables when embedding octave
Date: Mon, 02 Mar 2009 16:01:15 +0100

On Mon, 2009-03-02 at 10:36 +0100, Jaroslav Hajek wrote:
> On Mon, Mar 2, 2009 at 9:01 AM, Soeren Sonnenburg <address@hidden> wrote:
> > Dear all,
[..]
> symbol_table::global_varref (const std::string&) will create a
> variable (or reference an existing one) in the global scope.
> symbol_table::varref will work with local scope. Symbol table needs to
> be initialized.
> For more fine tuning, use symbol_table::insert which will return a
> symbol_record&.

yes that works, thanks!

> > (*) This will be in the shogun toolbox (http://www.shogun-toolbox.org),
> > currently things like
> >
> > A=[[1,2,3];[4,5,6]];
> > B=[[1,1,1];[0,0,0]];
> > pythoncode=sprintf('import numpy\nresults=(A+B, 2*B, [ "bla1", "bla2" 
> > ])\n');
> > [A2,B2,bla]=elwms('run_python', 'A',A, 'B',B, 'pythoncode', pythoncode)
> >
> > work.
> 
> Just out of curiosity; if Shogun is implemented in C++ (as the site
> says), why do you want to interface Octave to Python for it?

shogun has interfaces to octave,r,python and matlab and the command
line. sometimes things are more efficient to do in other languages and
well I know of many people trying to get rid of matlab. Some switched to
python, some to octave and it is all a mess when you have to cooperate
with them :)

> Is the license compatible with GPL 3?

shogun's? Yes it is GPL3, python uses the python license (more
permissive) and compatible to the gpl too.

thanks a lot for your help,
Soeren


reply via email to

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