help-octave
[Top][All Lists]
Advanced

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

Basic question: usage of Java methods in Octave


From: gennari . federico
Subject: Basic question: usage of Java methods in Octave
Date: Thu, 10 Oct 2013 18:09:09 +0200

Dear all,

 

I'm a newbie in Octave, I just started using the language since I have to do some porting from Matlab .m functions to Octave. Right now I'm stuck with this operation:


import java.lang.Integer;
import java.lang.Float;

xEc_lin = dec2hex(bin2dec(char(Integer.toBinaryString(Float.floatToIntBits(single(DirTvGenData.ec_lin))))),8);
   

I bypassed the import function creating a dummy one (otherwise it gives me a error such as " 'Import' is not a supported function"), since the class should be already active thanks to the Java package installed:

octave:5> v = javaObject ("java.lang.Integer", 12)
v =  12

So it's recognized and it's working when called as Java Object. But the method Integer.toBinaryString is not working:

error: 'Integer' undefined near line 93 column 32
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: evaluating argument list element number 1

 

So, there's a basic lack in my knowledge of Java methods usage with Octave, which is not happening for sure with Matlab. How can overcome this? Tried to read the manuals, looking for suggestions in half a dozen message boards, but nothing yet.

Thankis in advance to anyone who would be so kind to share his opinions.

 

Warm regards,

 

 

Federico



Tiscali Incontri by Meetic
Offerta esclusiva pensata per te: 7 giorni gratis per fare nuovi incontri! http://k.ilius.net/?mtcmk=739565&fsid=080


reply via email to

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