User`s guide

Using Class Methods
Example Constructing an Empty Cell Array Object
This first example creates an empty MWCellArray object:
MWCellArray C = new MWCellArray();
System.out.println("C = " + C.toString());
When run, the example displays this output:
C=[]
Example Constructing an Initialized Cell Array Object
The second example cons tructs and initializes a 2-by-3 MWCellArray object:
int[] cdims = {2, 3};
MWCellArray C = new MWCellArray(cdims);
Integer[] val = new Integer[6];
for(inti=0;i<6;i++)
val[i] = new Integer(i * 15);
for(inti=0;i<2;i++)
for(intj=0;j<3;j++)
{
int[] idx = {i+1, j+1};
C.set(idx, val[j + (i * 3)]);
}
System.out.println("C = " + C.toString());
When run, the example displays this output:
C = [ 0] [15] [30]
[45] [60] [75]
Methods to Destroy an MWCellArray
To destroy the arrays, use either dispose or disposeArray.
4-137