フィルターのクリア

How to use Matlab Objects within a Java Application

1 回表示 (過去 30 日間)
Brandon Osborn
Brandon Osborn 2015 年 11 月 10 日
回答済み: Shruti Sapre 2015 年 11 月 16 日
Within our Java Application, we have Matlab create a Matlab Object. The goal is for Matlab to pass the Matlab Object to the Java Application. The Java Application does not need to access any of the Objects functions, but it does pass the reference around to other Java Classes. If the Matlab Object is passed, a Runtime Exception occurs because the Matlab Object is not an instance of an MWArray. If the Matlab Object is wrapped within a struct, the application works perfectly. During a code review, it was expressed that wrapping the Matlab within a Struct seemed unnecessary, yet, I cannot find documnetation that supposrts the observed behavior that a Matlab Object cannot be captured in Java without it being wrapped within a struct.
Matlab version - R2013b Matlab Builder JA - 2.3 Matlab Compiler - 5.0

採用された回答

Shruti Sapre
Shruti Sapre 2015 年 11 月 16 日
Hi Brandon,
I understand that you wrap MATLAB objects into a struct before calling it through Java, and could not find a documentation link that supports this behavior.
The below link lists the conversion of MATLAB types to Java types:
“MATLAB object” is unsupported and hence cannot be used directly in a Java application. It needs to be converted in a compatible format to be used in a Java application.
Hope this helps!
-Shruti

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeJava Package Integration についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by