MATLAB BUILDER JA 2 Guide de l'utilisateur Page 125

  • 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 124
Using Class Methods
Example Getting an MWArray with toArray
Create and d isplay a copy of MWArray object A:
int[][] x = (int[][]) A.toArray();
int[] dimA = A.getDimensions();
System.out.println("Matrix A is:");
for (int i = 0; i < dimA[0]; i++)
{
for (int j = 0; j < dimA[1]; j++)
System.out.print(" " + x[i][j]);
System.out.println();
}
When run, the example displays this output:
Matrix A is:
123456
789101112
13 14 15 16 17 18
Methods to Copy, Convert, and Compare MWArrays
Use these methods to copy, conv ert, and compare objects of class MWArray or
any of its child classes.
Method Description
“clone” on page
4-50
Creates and returns a deep copy of this array.
“compareTo” on
page 4-51
Compares this array with the specified array for order.
“equals” on page
4-52
Indicates whether some other array is equal to this one.
“hashCode” on
page 4-52
Returns a hash code value for the array.
4-49
Vue de la page 124
1 2 ... 120 121 122 123 124 125 126 127 128 129 130 ... 291 292

Commentaires sur ces manuels

Pas de commentaire