Skip to content

Sparse Matrices

Built-in functions › Mathematics › Sparse Matrices

11 functions in this category.

FunctionWhat it does
fullConvert a sparse matrix to full storage.
issparseTest whether the input is a sparse matrix.
nnzNumber of non-zero elements.
nonzerosColumn vector of non-zero elements.
nzmaxStorage allocated for non-zero elements.
spallocAllocate space for an m × n sparse matrix.
sparseCreate a sparse matrix.
speyeSparse identity matrix.
sponesReplace non-zero entries with 1s.
sprandSparse uniform random matrix.
sprandnSparse standard-normal random matrix.