ispy

Visualize sparsity pattern and the size of the elements of a matrix.

You are now following this Submission

ISPY(S) extends the functionality of the native MATLAB function SPY by plotting the sparsity pattern of the matrix S and visualizing the size and sign of its elements. Positive elements are plotted in red and negative elements in blue. Zero elements are not plotted. The size of an element is scaled logarithmically.

The imaginary part of any number is discarded. NaNs are plotted as red stars on a yellow background. Infs are plotted as blue stars on a green background. If the matrix is very big, try zooming in to get a more accurate view.

For example, try typing "ispy(gallery('wathen',4,4))" to get the picture shown in the screenshot.

More info and examples available by typing "help ispy".

Joint work by Samu Alanko and Patrick N. Raanes.

Cite As

Samu (2026). ispy (https://se.mathworks.com/matlabcentral/fileexchange/43154-ispy), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0.0

Fixed typos.

1.0.0.0