MATLAB BUILDER JA 2 Guide de l'utilisateur Page 164

  • 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 163
4 Using MWArra y Classes
Input Parameters
None
Exceptions
The clone method throws the following exception:
java.lang.CloneNotSupportedException
The object’s class does not implement the Cloneable in terf ace.
Example C loning a Numeric Array Object
Createa3-by-6arrayoftypedouble:
double[][] AData = {{ 1, 2, 3, 4, 5, 6},
{ 7, 8 , 9, 10, 11, 12},
{13, 14, 15, 16, 17, 18}};
MWNumericArray A = new MWNumericArray(AData, MWClassID.DOUBLE);
Create a clone of the MWNumericArray object A:
Object C = A.clone();
System.out.println("Clone of matrix A is:");
System.out.println(C.toString());
When run, the example displays this output:
Clone of matrix A is:
123456
7 8 9101112
13 14 15 16 17 18
compareTo. MWNumericArray inherits this method from the MWArray class.
4-88
Vue de la page 163
1 2 ... 159 160 161 162 163 164 165 166 167 168 169 ... 291 292

Commentaires sur ces manuels

Pas de commentaire