Serg
Serg

Reputation: 14108

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

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 = SomeParser( xmlFilename, classname );

Upvotes: 0

Views: 1111

Answers (1)

Jeff Storey
Jeff Storey

Reputation: 57192

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.

Upvotes: 1

Related Questions