help-octave
[Top][All Lists]
Advanced

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

Re: Using external C++ functions from Octave


From: Tatsuro MATSUOKA
Subject: Re: Using external C++ functions from Octave
Date: Wed, 3 Sep 2008 04:39:04 +0900 (JST)

Hello
Perhaps you have to write wrapper code to the open source code.

Please read:
 A.1.9 Calling External Code from Oct-Files
in the octave manual, Appendix A: Dynamically Linked Functions.

That is what you want, I think.

Regards

Tatsuro

--- Tamara Bechtold <address@hidden> wrote:

> Dear all,
> 
> I am trying to read in aggument in Octave and pass them to a C++ 
> function to be compiled. I want to read-in a single argument which can 
> be either double or int, say the user gives 1 or 1.0. Within the c++ 
> function I am trying to check what kind of argument was passed by the 
> user with following code:
> int m;
> double n;
> if (args(3).is_scalar_type())
>  m = args(3).int_value();
> if (args(3).is_double_type())
>  n= args(3).double_value();
> But it does not work. In other word when I pass 10.0 both variables, m 
> and n are initialized with 10! I want only n to get the value 10.0. How 
> can this be done? Can enybody help?
> Many thanks in advance.
> Tamara
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
> 


--------------------------------------
Enjoy MLB with MAJOR.JP! Ichiro, Matsuzaka, Matsui, and more!
http://pr.mail.yahoo.co.jp/mlb/


reply via email to

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