full
Convert sparse matrix to full storage
Syntax
Description
Examples
Input Arguments
Tips
If
X
is anm
-by-n
matrix withnz
nonzero elements, thenfull(X)
requires space to storem*n
elements. On the other hand,sparse(X)
requires space to storenz
elements and(nz+n+1)
integers.The density of a matrix (
nnz(X)/numel(X)
) determines whether it is more efficient to store the matrix as sparse or full. The exact crossover point depends on the matrix class, as well as the platform. For example, in 32-bit MATLAB®, a double sparse matrix with less than about 2/3 density requires less space than the same matrix in full storage. In 64-bit MATLAB, however, double matrices with fewer than half of their elements nonzero are more efficient to store as sparse matrices.
Extended Capabilities
Version History
Introduced before R2006a