|
From: | Michael Goffioul |
Subject: | Re: Basic question: usage of Java methods in Octave |
Date: | Thu, 10 Oct 2013 12:34:10 -0400 |
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 = 12So 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.
[Prev in Thread] | Current Thread | [Next in Thread] |