Amount of storage allocated for nonzero matrix elements
n = nzmax(S)
n = nzmax(S) returns the
amount of storage allocated for nonzero elements in sparse matrix
For sparse matrices,
nzmax(S) >= 1.
Sis a full matrix, then
nzmax(S)is equal to
the same. But if
S is created by an operation which
produces fill-in matrix elements, such as sparse matrix multiplication
or sparse LU factorization, then more storage might be allocated than
is actually required, and
nzmax(S) reflects this.
sparse(i,j,s,m,n,nzmax) or its simpler
spalloc(m,n,nzmax), can set
anticipation of later fill-in.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Run code in the background using MATLAB®
backgroundPool or accelerate code with Parallel Computing Toolbox™
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).
Introduced before R2006a