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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 292
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 214
Using Class Methods
Method Description
“classID” on page 4-139 Returns the M ATLAB type of this array.
“getDimensions” on page
4-139
Returns an array containing the size of each
dimension of this array.
“isEmpty” on page 4-140 Tests whether the array has no ele ments.
“numberOfDimensions”
on page 4-140
Returns the number of dimensions of this array.
“numberOfElements” on
page 4-140
Returns the total number of elements in this
array.
classID. This m ethod returns the MATLAB type of this array. The classID
method of MWCellArray overrides the classID method of class MWArray.
The prototype for the
classID method is
public MWClassID classID()
Input Parameters
None
Example Getting the Class ID of a Cell Array
Create an MWCellArray object an d display its class:
int[] cdims = {2, 3};
MWCellArray C = new MWCellArray(cdims);
System.out.println("Class of C is " + C.classID());
When run, the example displays this output:
Class of C is cell
getDimensions.
MWCellArray inherits this method from the MWArray class.
4-139
Przeglądanie stron 214
1 2 ... 210 211 212 213 214 215 216 217 218 219 220 ... 291 292

Komentarze do niniejszej Instrukcji

Brak uwag