MATLAB BUILDER JA 2 Guide de l'utilisateur Page 141

  • 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 140
Using Class Methods
short[]
byte[]
boolean[]
One-dimensional arrays of any subclass of java.lang.Number
One-dimensional arrays of java.lang.Boolean
Exceptions
The newInstance method throws the following exceptions:
NegativeArraySizeException
The specified dims para m eter is negative.
ArrayStoreException
Thearraytypeisnonnumeric.
Example Constructing a Numeric Array Object with newInstance
Construct a 3-by-6 real numeric array using the newInstance method. Note
that data in the Java array must be stored in column-wise order so that it will
be in the correct order in the final
MWNumericArray object.
int[] dims = {3, 6};
double[] Adata = { 1, 7, 13,
2, 8, 14,
3, 9, 15,
4, 10, 16,
5, 11, 17,
6, 12, 18};
MWNumericArray A =
MWNumericArray.newInstance(dims, Adata, MWClassID.DOUBLE);
System.out.println("A = " + A);
4-65
Vue de la page 140
1 2 ... 136 137 138 139 140 141 142 143 144 145 146 ... 291 292

Commentaires sur ces manuels

Pas de commentaire