Example of coding a `struct` in Java when packaging Matlab function?
显示 更早的评论
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Java Package Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!