User`s guide

Guidelines for Working with MWArray Classes
index[1] = 2;
double[][] x12 = (double[][])a.get(index);
index[0] = 2;
boolean[][] x22 = (boolean[][])a.get(index);
index[1] = 1;
int[][] x21 = (int[][])a.get(index);
As with set, default conversion rules are applied(samerulesasapplyto
toArray). In this example, the default rules are fine. In the case where
complex arrays, other cell arrays, or struct a rrays are stored in the cell array,
it is recommended to use
getCell to return an MWArray insta n ce.
toArray and getData Methods
In addition to get and getCell,thetoArray and getData methods are
implemented o n
MWCellArray to return a conversion of the entire cell array.
These methods provide a bulk conversion to an array of Java arrays, although
the output can be difficult to dissect in some cases (particularly in the case
of nested cell arrays).
The
getData method returns a one-dimensional array o f type Object.Each
element of the return cell array is converted by calling
toArray on the
corresponding cell.
The
toArray method returns the same array, except that it has the same
dimensionality as the underlying cell array.
4-37