MATLAB BUILDER JA 2 Podręcznik Użytkownika Strona 129

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 292
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 128
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
Przeglądanie stron 128
1 2 ... 124 125 126 127 128 129 130 131 132 133 134 ... 291 292

Komentarze do niniejszej Instrukcji

Brak uwag