MATLAB BUILDER JA 2 Guide de l'utilisateur Page 182

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 292
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 181
1 2 ... 177 178 179 180 181 182 183 184 185 186 187 ... 291 292

Commentaires sur ces manuels

Pas de commentaire