MATLAB BUILDER JA 2 Guida Utente Pagina 194

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 292
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 193
4 Using MWArra y Classes
Example Making a Shared Copy of a Character Array Object
Create a shared copy of MWCharArray object A:
char[] chArray = {'H', 'e', 'l', 'l', 'o'};
MWCharArray A = new MWCharArray(chArray);
Object S = A.sharedCopy();
System.out.print("Shared copy of matrix A is \"" +
S.toString() + "\"");
When run, the example displays this output:
Shared copy of matrix A is "Hello"
toString. MWCharArray inherits this method from the MWArray class.
Using MWStructArray
This section cov ers the following topics:
“Constructing an MWStructArray” on page 4-118
“Methods to Destroy an MWStructArray” on page 4-120
“Methods to Return Information About an MWStructArray” on page 4-121
“Methods to Get and Set Data in the M WStructArray” on page 4-124
“Methods to Copy, Convert, and Compare MWStructArrays” on page 4 -132
Constructing an MWStructArray
Use the table s in this section to constru ct an MWStructArray from a particular
Java data type. See the e xamples at the end of this section for m ore help.
Constructing an Empty Structure Array. To construct an empty 0-by-0
MATLAB structure a rray, use
MWStructArray()
4-118
Vedere la pagina 193
1 2 ... 189 190 191 192 193 194 195 196 197 198 199 ... 291 292

Commenti su questo manuale

Nessun commento