MATLAB BUILDER JA 2 Guide de l'utilisateur Page 138

  • 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 137
4 Using MWArra y Classes
MWClassID classid)
The type javatype canbeanyofthefollowing:
double
float
long
int
short
byte
boolean
Object
Example Constructing a Real Array of a Specific T ype
Construct a 3-by-6 real array of type MWClassID.SINGLE:
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.SINGLE);
System.out.println("Array A = \n" + A);
When run, the example displays this output:
A=123456
7 8 9101112
13 14 15 16 17 18
Example Constructing a Complex Array of a Specific Type
Construct a 1-by-3 complex array of MWClassID.DOUBLE:
double[] AReal = {24.2, -7, 113};
double[] AImag = {5, 31, 27};
4-62
Vue de la page 137
1 2 ... 133 134 135 136 137 138 139 140 141 142 143 ... 291 292

Commentaires sur ces manuels

Pas de commentaire