sprank
Structural rank of a matrix.
📝Syntax
r = sprank(S)
📥Input Arguments
Parameter Description
S a sparse or full floating-point or logical matrix.
📤Output Arguments
Parameter Description
r structural rank.
📄Description

sprank returns the structural rank of a matrix, computed from its nonzero pattern.

The value is the size of a maximum matching between matrix rows and columns.

Double, single, logical, complex double, and complex single matrices are supported, both full and sparse. For sparse input, stored zero values are ignored when the structural pattern is built.

Structural rank can be larger than numeric rank because it depends only on the locations of nonzero values, not on numerical linear dependence.

💡Examples
S = sparse([1 1; 1 1]);
r = sprank(S)
S = sparse([1 2 1 2], [1 1 2 2], single([0 -0 complex(0, 0) complex(0, 2)]), 2, 2, 4);
r = sprank(S)
🔗See Also
sparsennz
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub