help-octave
[Top][All Lists]
Advanced

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

Re: Octave static functions in a C++ program


From: Søren Hauberg
Subject: Re: Octave static functions in a C++ program
Date: Thu, 28 Feb 2008 08:51:32 +0100

ons, 27 02 2008 kl. 18:45 -0500, skrev Julia Petruescu:
> I'm using Octave in a C++ Program and environment and I would like to
> use statistic function as: rank(), std(), mean(), etc.
> 
> I do not see any header file such
> as .../octave/oct.h, .../octave/Matrix.h, etc to include them in my C++
> files. However I can see: mean.m, rank.m, etc files from scripts. 
> Any idea how to use it in my C++ code?!
Since you want to use m-files you have to use the interpreter. You can
call 'feval' from C++ to do this. I can't remember the API off the top
of my head, but it's something like this

octave_value_list result = feval("mean", my_arg_list);

where 'my_arg_list' is an octave_value_list. 

Søren



reply via email to

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