[Top][All Lists]

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

Re: Basic question: usage of Java methods in Octave

From: PhilipNienhuis
Subject: Re: Basic question: usage of Java methods in Octave
Date: Thu, 10 Oct 2013 12:15:50 -0700 (PDT)

gennari.federico wrote
> 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);

To me this looks like a ridiculously convoluted statement for a beginner.
I'd also call it ugly code - better disentangle it into more manageable
statements with intermediate statements, starting with the contents of the
innermost parentheses.

Could it also be invoking Matlab's classdef system? (which isn't supported
in Octave yet)

> :
> <snip>
> :
> 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

Well, that ^^^^^^^^^ is a very clear message. So, where does "Integer" come

Better find out what "Float", "Integer", "DirTvGenData", "ec_lin" are -
variables? Java objects? Java methods? Octave variables?  Where are they


View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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