User`s guide

Using Class Methods
Example Determining the Complexity of an Array
Determine whether matrix A is real or complex. The complexity method of
MWNumericArray returns an enumeration of type MWComplexity.
double AReal = 24;
double AImag = 5;
MWNumericArray A = new MWNumericArray(AReal, AImag);
System.out.println("A is a " + A.complexity() + " matrix");
When run, the example displays this output:
A is a complex matrix
Methods of MWCom plex ity
toString. This m ethod returns a string representation of the property. The
toString method of MWComplexity overrides the toString method of class
java.lang.Object.
The prototype for the
toString method is as follows:
public java.lang.String toString()
4-153