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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 292
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 171
4 Using MWArra y Classes
To construct a sparse logical matrix with no nonzero elements, use the
following:
public static MWLogicalArray newSparse(int rows, int cols,
int nzmax)
To construct a sparse logical matrix from a supplied full matrix, use the
following:
public static MWLogicalArray newSparse(Object data)
To specify what data is assigned to each element, use the following:
public static MWLogicalArray newSparse(int[] rowindex,
int[] colindex, Object data)
To specify the number of rows and columns in the array, use the following:
public static MWLogicalArray newSparse(int[] rowindex,
int[] colindex, Object data, int rows, int cols)
To specify the maximum number of nonzero elements in the array, use the
following:
public static MWLogicalArray newSparse(int[] rowindex,
int[] colindex, Object data, int rows, int cols,
int nzmax)
Input Parameters
data
Data to initialize the array. See the list of valid d ata types below.
rowIndex and colIndex
Arrays of one-based row and column indices
Row and column index arrays are used to construct the sparse array such that
the following holds true, with space allocated for
nzmax nonzeros:
4-96
Przeglądanie stron 171
1 2 ... 167 168 169 170 171 172 173 174 175 176 177 ... 291 292

Komentarze do niniejszej Instrukcji

Brak uwag