[MATLAB logo] Exploiting MATLAB's Data Structures

Sparse Matrices

Usage: Use sparse matrices when the essential data include lots of zeros.

Examples:

histogram of indexed images
connection matrices such as those for finite elements
binary trees

Problem #4 - Sparse Matrices

More info ...

Specialized sparse functions

sparse  Create sparse array
spy  Visualize sparsity pattern
full  Convert to full array
find  Find indices of non-zero elements
nnz  number of non-zeros

Copyright © 1997 The MathWorks, Inc.
clay@mathworks.com
$Revision$ $Date$