%% Clone Sparsity from Existing Array
% Create a 10-by-10 sparse matrix.

p = sparse(10,10,pi);

%
% Create a 2-by-3 matrix of zeros that is sparse like p.

X = zeros(2,3,'like',p)

% Copyright 2012 The MathWorks, Inc.