I have similar matlab and java classes:
public class myClass {
double[][] v1;
String v2;
}
I need to export the matlab object, whos struct is:
obj =
v1: [2x2 double]
v2: 'abc'
into Java. Is there a common way to do it?
I can also save the struct as xml file.
Is there any parser that can do:
myClass obj = 开发者_StackOverflow社区SomeParser( xmlFilename, classname );
Matlab and Java can interact using http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html. You can also look at XStream for reading objects in from XML.
精彩评论