%% Create Sparse Matrices with Same Sparsity Pattern
% Create the 60-by-60 sparse adjacency matrix of the connectivity graph of the Buckminster Fuller geodesic dome. Plot the sparsity pattern of the matrix S.

S = bucky;
spy(S)

% Create another sparse matrix R that has the same sparsity pattern as the matrix S, but with uniformly distributed random entries. Plot the sparsity pattern of R.

R = sprand(S);
spy(R)

%
% Copyright 2020 The MathWorks, Inc.