MATLAB BUILDER JA 2 Guida Utente Pagina 138

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 292
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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
Vedere la pagina 137
1 2 ... 133 134 135 136 137 138 139 140 141 142 143 ... 291 292

Commenti su questo manuale

Nessun commento