开发者

exporting matlab class object (or struct) into java object of similar class using xml

开发者 https://www.devze.com 2022-12-16 05:27 出处:网络
I have similar matlab and java classes: public class myClass { double[][] v1; String v2; } I need to export the matlab object, whos struct is:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消