MATLAB BUILDER JA 2 Guida Utente Pagina 124

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 292
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 123
4 Using MWArra y Classes
Exceptions
The set method throws the following exception:
IndexOutOfBoundsException
The specified index parameter is invalid.
Example Setting an MWArray Value
Modify the data in element (2, 4)ofMWArray object A:
int[] index = {2, 4};
A.set(index, 555);
Object d_out = A.get(index);
System.out.println("Data read from A(2,4) is " +
d_out.toString());
When run, the example displays this output:
Data read from A(2,4) is 555
toArray. This method creates an array with t he same dimensionality as the
MATLAB array.
The prototype for the
toArray method is as fo llows:
public Object[] toArray()
The elements of the returned array are converted according to default
conversion rules. If the underlying MATLAB array is a complex numeric
type,
toArray returns the real part.
Input Parameters
None
4-48
Vedere la pagina 123
1 2 ... 119 120 121 122 123 124 125 126 127 128 129 ... 291 292

Commenti su questo manuale

Nessun commento