Hello,

Could someone who is familiar with the Java package explain how to pass a 2D
octave array to a java method?

When I try the following java method

package naa.tools;
public class Matlab
{
static public String isa(double [][] x) { return "double [][]";}
static public String isa(Object x) {return x.getClass().getName();}
}

on the octave command-line with a 2D matrix, I get, for example,

octave-3.2.4.exe:4> java_invoke("naa.tools.Matlab", "isa", [1 2; 3 4])
ans = org.octave.OctaveReference



So if a 2D octave matrix does not map directly to a java double [][], is
there a method to test whether this OctaveReference object refers to a
matrix, and if so, to convert that reference to a double[][] version of the
original argument?


I use java-1.2.7 on the Octave-Forge Windows v3.2.4 binary.

Thanks,

BZ
-- 
View this message in context: 
http://old.nabble.com/How-to-pass-an-Octave-matrix-to-JVM-via-java_invoke%28%29-tp31317186p31317186.html
Sent from the octave-dev mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to