User`s guide
Using Class Methods
disposeArray. MWCharArray inherits this method from the MWArray class.
Methods to R eturn Information About an MWCharArray
Use these methods to return informatio n about an object of class MWCharArray.
Method Description
“classID” on page 4-111 Returns the MATLAB type of this array.
“getDimensions” on
page 4-112
Returns an array containing the size of each
dimension of this array.
“isEmpty” on p age
4-112
Tests whether the array has no elements.
“numberOfDimensions”
on page 4-112
Returns the number of dimensions of this array.
“numberOfElements”
on page 4-112
Returns the total number of elements in this
array.
classID. This m ethod returns the MATLAB type of the MWCharArray object.
The
classID method of MWCharArray overrides the classID method of class
MWArray.
The prototype for the
classID method is
public MWClassID classID()
Input Parameters
None
Example — Getting the Class ID of a Character Array
Create an MWCharArray object and then display the class ID:
char[] chArray1 = {'H', 'e', 'l', 'l', 'o'};
MWCharArray A = new MWCharArray(chArray1);
System.out.println("The class of A is " + A.classID());
4-111