Mathematics    

Function Summary

The sparse matrix functions are located in the sparfun directory in the MATLAB toolbox directory.

Function Summary  
Category
Function
Description
Elementary sparse matrices
speye
Sparse identity matrix.

sprand
Sparse uniformly distributed random matrix.

sprandn
Sparse normally distributed random matrix.

sprandsym
Sparse random symmetric matrix.

spdiags
Sparse matrix formed from diagonals.
Full to sparse
conversion
sparse
Create sparse matrix.

full
Convert sparse matrix to full matrix.

find
Find indices of nonzero elements.

spconvert
Import from sparse matrix external format.
Working with
sparse matrices
nnz
Number of nonzero matrix elements.

nonzeros
Nonzero matrix elements.

nzmax
Amount of storage allocated for nonzero matrix elements.

spones
Replace nonzero sparse matrix elements with ones.

spalloc
Allocate space for sparse matrix.

issparse
True for sparse matrix.

spfun
Apply function to nonzero matrix elements.

spy
Visualize sparsity pattern.
Graph theory
gplot
Plot graph, as in "graph theory."

etree
Elimination tree.

etreeplot
Plot elimination tree.

treelayout
Lay out tree or forest.

treeplot
Plot picture of tree.
Reordering
algorithms
colamd
Column approximate minimum degree permutation.

colmmd
Column minimum degree permutation.

symamd
Symmetric approximate minimum degree permutation.

symmmd
Symmetric minimum degree permutation.

symrcm
Symmetric reverse Cuthill-McKee permutation.

colperm
Column permutation.

randperm
Random permutation.

dmperm
Dulmage-Mendelsohn permutation.
Linear algebra
eigs
A few eigenvalues.

svds
A few singular values.

luinc
Incomplete LU factorization.

cholinc
Incomplete Cholesky factorization.

normest
Estimate the matrix 2-norm.

condest
1-norm condition number estimate.

sprank
Structural rank.
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 the Normal Equations.

minres
Minimum Residual Method.

pcg
Preconditioned Conjugate Gradients Method.

qmr
Quasi-Minimal Residual Method.

symmlq
Symmetric LQ method
Miscellaneous
spaugment
Form least squares augmented system.

spparms
Set parameters for sparse matrix routines.

symbfact
Symbolic factorization analysis.


  Sparse Matrices Introduction