User`s guide
Using Class Methods
Example — Getting an MWArray Hash Code
Obtain the hash code for MWArray object A:
System.out.println("Hash code for matrix A is " + A.hashCode());
When run, the example displays this output:
Hash code for matrix A is 456687478
sharedCopy. This method creates and returns a shared copy of the array.
The shared copy points to the underlying original MATLAB array. Any
changesmadetothecopyarereflectedintheoriginal.
The prototype for the
sharedCopy m ethod is as follows:
public Object sharedCopy()
Input Parameters
None
Example — Making a Shared Copy of an MWArray
Create a shared copy of MWArray object A:
Object S = A.sharedCopy();
System.out.println("Shared copy of matrix A is:");
System.out.println(S.toString());
When run, the example displays this output:
Shared copy of matrix A is:
123456
7 8 9101112
13 14 15 16 17 18
4-53