MATLAB BUILDER JA 2 Uživatelská příručka Strana 172

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 292
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 171
1 2 ... 167 168 169 170 171 172 173 174 175 176 177 ... 291 292

Komentáře k této Příručce

Žádné komentáře