Rank¶
- getRankLUSOL(A, printLevel)[source]¶
Get the rank of a matrix using treshold rook pivoting. Uses lusolFactor computes the sparse factorization \(A = L U\) for a square or rectangular matrix A. The vectors p, q are row and column permutations giving the pivot order.
- USAGE
[rankA, p, q] = getRankLUSOL (A, printLevel)
- INPUT
A – m x n rectangular matrix
- OPTIONAL INPUT
printLevel – default = 0
- OUTPUTS
rankA – rank of A
p – row permutations giving the pivot order
Note: p(1:rankA) gives indices of independent rows p(rankA+1:size(A, 1)) gives indices of dependent rows
q – column permutations giving the pivot order
Note: q(1:rankA) gives indices of independent columns q(rankA+1:size(A, 2)) gives indices of dependent columns
Note
Requires a 64 bit implementation of lusol, available from https://github.com/nwh/lusol