Function Reference

Sparse Matrices

The Creation and Manipulation of Sparse Matrices

spdiags
A generalization of the function `diag'.
speye
Returns a sparse identity matrix.
spfun
Compute `f(X)' for the non-zero values of X.
spmax
This function has been deprecated.
spmin
This function has been deprecated.
spones
Replace the non-zero entries of X with ones.
sprand
Generate a random sparse matrix.
sprandn
Generate a random sparse matrix.
sprandsym
Generate a symmetric random sparse matrix.
full
returns a full storage matrix from a sparse one
spalloc
Returns an empty sparse matrix of size R-by-C.
sparse
Create a sparse matrix from the full matrix or row, column, value triplets.
spconvert
This function converts for a simple sparse matrix format easily produced by other programs into Octave's internal sparse format.
issparse
Return 1 if the value of the expression EXPR is a sparse matrix.
nnz
Returns the number of non zero elements in A.
nonzeros
Returns a vector of the non-zero values of the sparse matrix S.
nzmax
Return the amount of storage allocated to the sparse matrix SM.
spstats
Return the stats for the non-zero elements of the sparse matrix S.
spy
Plot the sparsity pattern of the sparse matrix X.
etree
Returns the elimination tree for the matrix S.
etreeplot
Plot the elimination tree of the matrix S or `S+S'' if S in non-symmetric.
gplot
Plot a graph defined by A and XY in the graph theory sense.
treeplot
Produces a graph of tree or forest.
sparse_auto_mutate
Query or set the internal variable that controls whether Octave will automatically mutate sparse matrices to real matrices to save memory.
amd
Returns the approximate minimum degree permutation of a matrix.
ccolamd
Constrained column approximate minimum degree permutation.
colamd
Column approximate minimum degree permutation.
colperm
Returns the column permutations such that the columns of `S (:, P)' are ordered in terms of increase number of non-zero elements.
csymamd
For a symmetric positive definite matrix S, returns the permutation vector P such that `S(P,P)' tends to have a sparser Cholesky factor than S.
dmperm
Perform a Dulmage-Mendelsohn permutation on the sparse matrix S.
symamd
For a symmetric positive definite matrix S, returns the permutation vector p such that `S (P, P)' tends to have a sparser Cholesky factor than S.
symrcm
Symmetric reverse Cuthill-McKee permutation of S.

Linear Algebra on Sparse Matrices

normest
Estimate the 2-norm of the matrix A using a power series analysis.
condest
Estimate the 1-norm condition number of a matrix matrix A using T test vectors using a randomized 1-norm estimator.
spparms
Sets or displays the parameters used by the sparse solvers and factorization functions.
sprank
Calculates the structural rank of a sparse matrix S.
symbfact
Performs a symbolic factorization analysis on the sparse matrix S.
spaugment
Creates the augmented matrix of A.

Iterative Techniques applied to sparse matrices

pcg
Solves the linear system of equations `A * X = B' by means of the Preconditioned Conjugate Gradient iterative method.
pcr
Solves the linear system of equations `A * X = B' by means of the Preconditioned Conjugate Residuals iterative method.
luinc
Produce the incomplete LU factorization of the sparse matrix A.