%% Visualizing Sparse Matrices
% It is often useful to use a graphical format to view the distribution of the nonzero elements within a sparse matrix. The MATLAB spy function produces a template view of the sparsity structure, where each point on the graph represents the location of a nonzero array element.
% For example:
%
% Load the supplied sparse matrix west0479, one of the Harwell-Boeing collection.

load west0479

%
% View the sparsity structure.

spy(west0479)

% Copyright 2015 The MathWorks, Inc.