spy
Visualize sparsity pattern of matrix.
📝Syntax
spy(S)
spy(S, LineSpec)
spy(S, LineSpec, MarkerSize)
📥Input Arguments
Parameter Description
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);
Example illustration
f = figure();
rng('default');
S = sparse((rand(1, 10) + 1) * 100, (rand(1, 10) + 1) * 100 , (rand(1, 10) + 1) * 100);
spy(S, 45);
Example illustration
f = figure();
spy();
Example illustration
🔗See Also
sparseplot
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub