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 1984-2000 The MathWorks, Inc. 
%   $Revision: 5.7 $  $Date: 2000/06/02 17:59:25 $

nz = sparsfun('nnz',S);
