function nz = nnz(S);
%NNZ    Number of nonzero matrix elements.
%   nz = NNZ(S) is the number of nonzero elements in S.
%
%   The density of a sparse matrix S is nnz(S)/prod(size(S)).
%
%   See also NONZEROS, NZMAX, SIZE.

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 5.5 $  $Date: 1997/11/21 23:44:29 $

nz = sparsfun('nnz',S);
