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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 292
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 132
Using Class Methods
rowIndex. This method returns an array containing the row index of each
element in the underlying MATLAB array.
The prototype for the
rowIndex method is as follows:
public int[] rowIndex()
Input Parameters
None
Example Getting the Row Indices of a S parse MWArray
Get the row indices of the elements of the sparse array:
System.out.print("Row indices are: ");
int[] rowidx = A.rowIndex();
for(inti=0;i<5;i++)
System.out.print(rowidx[i] + " ");
System.out.println();
When run, the example displays this output:
Row indices are: 2 1 2 1 2
maximumNonZeros. This method returns the allocated capacity of a
sparse array. If the underlying array is nonsparse, this method returns the
same value as
numberOfElements.
The prototype for the
maximumNonZeros method is as follows:
public int maximumNonZeros()
Input Parameters
None
4-57
Przeglądanie stron 132
1 2 ... 128 129 130 131 132 133 134 135 136 137 138 ... 291 292

Komentarze do niniejszej Instrukcji

Brak uwag