Example of coding a `struct` in Java when packaging Matlab function?
Show older comments
I am embarking on writing a Java wrapper for intlinprog, and learning Java at the same time. My OOP experience is C++ circa 2004, so it has been an interesting learning curve reading up on Java code idioms, patterns, Matlab data conversions, the packaging process itself, and the Java compilation/invocation.
intlinprog takes a struct argument named options. Is there an example of how to code up a MATLAB struct in Java? According to Rules for Data Conversion Between Java and MATLAB, "Structure arrays are constructed and accessed as arrays of MWArray". Most examples of Java/Matlab interoperation use classes derived from MWArray.
I am using Matlab Compiler SDK rather than the Matlab engine, so I assume that Java class com.mathworks.matlab.types.Struct does not apply. I welcome any corrections if I'm wrong.
Accepted Answer
More Answers (0)
Categories
Find more on Java Package Integration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!