MATLAB BUILDER JA 2 Betriebsanweisung Seite 182

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 292
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 181
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
Seitenansicht 181
1 2 ... 177 178 179 180 181 182 183 184 185 186 187 ... 291 292

Kommentare zu diesen Handbüchern

Keine Kommentare