function r = sprank(A)
%SPRANK Structural rank.
%   r = SPRANK(A) is the structural rank of the sparse matrix A.
%   Also known as maximum traversal, maximum assignment, and
%   size of a maximum matching in the bipartite graph of A.
%   Always sprank(A) >= rank(A), and in exact arithmetic
%   sprank(A) == rank(sprandn(A)) with probability one.
%
%   See also DMPERM.

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

r = sum(dmperm(A)>0);
