Retrieving CellArray values ​​in a java data type

I am working with java interface for Java. In my matlab code, the function returns a cellarray that should be injected into the java data type. The cellarray value is retrieved in MWArray. But

I cannot pass individual cell data to a java data type.

CellArray contains string data in each cell. let's say cellarray is passed to MWArray 'x'. Can someone explain to me how to do further casting?

+3
source share
1 answer

I have an answer to this question ... the return value must be sent to MWCellArray, and later the getCell function must be used to get the cell value that will be the MWArray object.

MWArray - .

::

Object[] o = <matlab function called>
MWCellArray x = (MWCellArray)o[0];

MWArray arr = x.getCell(new int[]{1,1});

arr String. , arr.toString() ..:)

+3

Source: https://habr.com/ru/post/1796098/


All Articles