MATLAB BUILDER JA 2 Podręcznik Użytkownika Strona 217

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 292
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 216
Using Class Methods
Use the first syntax (int index) to return the ele ment at the specified
one-based offset in the a rray, accessing elements in column-wise order. Us e the
second syntax (
int[] index) to return the element at the specified array of
one-based indices. The first syntax offers better performance than the second.
Input Parameters
index
Index of the requested element in the MWCellArray
In the case where index is of type int, the valid range for index is 1<=index
<= N
,whereN is the total number of elements in the array.
Inthecasewhere
index is of type int[],eachelementoftheindex vector
is an index along one dimension of the
MWCellArray object. The valid range
for any index is
1 <= index[i] <= N[i],whereN[i] isthesizeoftheith
dimension.
Exceptions
The get method throws the following exception:
IndexOutOfBoundsException
The specified index parameter is invalid.
Example Getting Data from a Cell Array with get
Use get to read index (1,3) of MWCellArray object C:
int[] cdims = {1, 3};
MWCellArray C = new MWCellArray(cdims);
Integer val = new Integer(15);
int[] index = {1, 3};
4-141
Przeglądanie stron 216
1 2 ... 212 213 214 215 216 217 218 219 220 221 222 ... 291 292

Komentarze do niniejszej Instrukcji

Brak uwag