spy
Visualize sparsity pattern of matrix.
Syntax
- spy(S)
- spy(S, LineSpec)
- spy(S, LineSpec, MarkerSize)
Input argument
- S - matrix: sparse or dense.
- LineSpec - Line style, marker, and/or color: character vector or scalar string.
- MarkerSize - positive integer scalar value.
Description
spy(S) plots the sparsity pattern of the sparse matrix S.
Examples
f = figure();
rng('default');
S = sparse((rand(1, 10) + 1) * 100, (rand(1, 10) + 1) * 100 , (rand(1, 10) + 1) * 10);
spy(S);
f = figure();
rng('default');
S = sparse((rand(1, 10) + 1) * 100, (rand(1, 10) + 1) * 100 , (rand(1, 10) + 1) * 100);
spy(S, 45);
f = figure();
spy();
See also
History
Version | Description |
---|---|
1.0.0 | initial version |
Author
Allan CORNET