User`s guide

4 Using MWArra y Classes
hashCode. MWLogicalArray inherits this method from the MWArray class.
sharedCopy. This method creates and returns a shared copy of the
MWLogicalArray object. The shared copy points to the underlying original
MATLAB array. Any changes made to the copy are reflected in the original.
The
sharedCopy method of MWLogicalArray overrides the sharedCopy
method of class MWArray.
The prototype for the
sharedCopy method is
public Object sharedCopy()
Input Parameters
None
Example Making a Shared Copy of a Logical Array Object
Create a shared copy of MWLogicalArray object A:
boolean[][] Adata = {{true, false, false},
{false, true, false}};
MWLogicalArray A = new MWLogicalArray(Adata);
Object C = A.sharedCopy();
System.out.println("Shared copy of logical matrix A is:");
System.out.println(C.toString());
When run, the example displays this output:
Shared copy of logical matrix A is:
100
010
toString. MWLogicalArray inherits this method from the MWArray class.
4-106