MATLAB Function Reference | ![]() ![]() |
Elementary Sparse Matrices
spdiags | Sparse matrix formed from diagonals |
speye | Sparse identity matrix |
sprand | Sparse uniformly distributed random matrix |
sprandn | Sparse normally distributed random matrix |
sprandsym | Sparse random symmetric matrix |
Full to Sparse Conversion
find | Find indices of nonzero elements |
full | Convert sparse matrix to full matrix |
sparse | Create sparse matrix |
spconvert | Import from sparse matrix external format |
Working with Sparse Matrices
issparse | True for sparse matrix |
nnz | Number of nonzero matrix elements |
nonzeros | Nonzero matrix elements |
nzmax | Amount of storage allocated for nonzero matrix elements |
spalloc | Allocate space for sparse matrix |
spfun | Apply function to nonzero matrix elements |
spones | Replace nonzero sparse matrix elements with ones |
spparms | Set parameters for sparse matrix routines |
spy | Visualize sparsity pattern |
Reordering Algorithms
colamd | Column approximate minimum degree permutation |
colmmd | Column minimum degree permutation |
colperm | Column permutation |
dmperm | Dulmage-Mendelsohn permutation |
randperm | Random permutation |
symamd | Symmetric approximate minimum degree permutation |
symmmd | Symmetric minimum degree permutation |
symrcm | Symmetric reverse Cuthill-McKee permutation |
Linear Algebra
cholinc | Incomplete Cholesky factorization |
condest | 1-norm condition number estimate |
eigs | Eigenvalues and eigenvectors of sparse matrix |
luinc | Incomplete LU factorization |
normest | Estimate matrix 2-norm |
sprank | Structural rank |
svds | Singular values and vectors of sparse matrix |
Linear Equations (Iterative Methods)
bicg | BiConjugate Gradients method |
bicgstab | BiConjugate Gradients Stabilized method |
cgs | Conjugate Gradients Squared method |
gmres | Generalized Minimum Residual method |
lsqr | LSQR implementation of Conjugate Gradients on Normal Equations |
minres | Minimum Residual method |
pcg | Preconditioned Conjugate Gradients method |
qmr | Quasi-Minimal Residual method |
spaugment | Form least squares augmented system |
symmlq | Symmetric LQ method |
Tree Operations
etree | Elimination tree |
etreeplot | Plot elimination tree |
gplot | Plot graph, as in "graph theory" |
symbfact | Symbolic factorization analysis |
treelayout | Lay out tree or forest |
treeplot | Plot picture of tree |
![]() | Specialized Math | Math Constants | ![]() |