full
Convert a sparse matrix to full storage.
Syntax
Section titled “Syntax”f = full(s)Description
Section titled “Description”Returns a full (dense) matrix containing the same values as the sparse matrix s. Already-full inputs are returned unchanged. The result occupies storage proportional to numel(s), so converting a large mostly-zero sparse matrix can blow up memory — use only when the dense form is genuinely needed.
Examples
Section titled “Examples”S = sparse([1 2], [1 2], [10 20]);full(S) % [10 0; 0 20]