User`s guide

Using Class Methods
Example—DisposingofaStructureArrayObject
int[] sdims = {1, 2};
String[] sfields = {"f1", "f2", "f3"};
MWStructArray S = new MWStructArray(sdims, sfields);
System.out.println("Structure array S: " + S);
System.out.println("Now disposing of array S\n");
S.dispose();
System.out.println("Structure array S: " + S);
When run, the example displays this output:
Structure array S: 1x2 struct array with fields:
f1
f2
f3
Now disposing of array S
Structure array S: []
disposeArray. MWStructArray inherits this method from the MWArray class.
Methods to Return Information About an MWStructArray
Use these methods to return information about an object of class
MWStructArray.
Method Description
“classID” on page 4-122 Returns the MATLAB type of this array.
“fieldNames” on page
4-122
Returns the field names in this array.
“getDimensions” on page
4-123
Returns an array containing the size of each
dimension of this array.
“isEmpty” on page 4-123 Tests whether the a rray has no elements.
4-121