[Top][All Lists]

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

Two questions about Java in Octave 4

From: Ericbarnhill
Subject: Two questions about Java in Octave 4
Date: Mon, 29 Feb 2016 06:43:51 -0500

Two questions about Octave Java usage. I would be happy to push some small changes to the Java section of the Octave FAQ after discussing, if the community so wishes.

1) sending (>1)D arrays to Java methods.

One of my objects has methods called dt.forward1d(double[] x)  and dt.forward2d(double[][] x).

The following works: dt.forward1d(ones(64, 1))

However the following does not: dt.forward2d(ones(64,64))

Can anyone explain why this is so. Do I need to send JavaArray objects for dims > 1.

2) javaArrays. Can anyone cite the exact syntax for creating a java array of primitive type, say double. The following works:

javaArray("java.lang.Double", 16, 16)

but is of course boxed. The following does not:

javaArray("double", 16, 16)

The FAQ specifies that primitives are supported so perhaps I can add to the FAQ the specific syntax to create a double array.

Thanks for the help and 4.0 looks fantastic.


Sent from ProtonMail, encrypted email based in Switzerland.

reply via email to

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