How to use MWBuiltInArray which was return as Object by JavaBuilder in a API call

1 view (last 30 days)
Hi,
I have some legacy functions in Matlab which I can not modify. I can only use JavaBuilter wrapper functions from java to use those. It returns as Object[]
Object[] result = wrapperObj.callSomeFunction(1,param1, param2, param3);
If matlab function is returning a vector then I can fetch the values. If it is returning struct then I can typecast it to MWStructArray but it is somethingelse (I guess matlab object) then I am not able to use matlab object. Casting it to MWStructArray gives below exception
com.mathworks.toolbox.javabuilder.MWBuiltinArray cannot be cast to com.mathworks.toolbox.javabuilder.MWStructArray
In which java class I should cast it ?
Thanks, Rahul

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!