Consider the following, where A has the sparse matrix attribute.
>> rank(A)Error using svdUse svds for sparse singular values and vectors.Error in rank (line 14)s = svd(A); >> null(A);Error using svdUse svds for sparse singular values and vectors.Error in null (line 66) [~,S,V] = svd(A,0);
Is there a way, without writing your own, to get an SVD-based null without doing null(full(A)), and SVD-based rank without doing rank(full(A))?
Note that qr and eig are allowed on a sparse matrix, but svd is not. Is there a reason for this? Yes, I can get rank and nullspace basis using qr on a sparse matrix, bit why not be allowed to use SVD-based commands without taking full of the matrix?
svds is based on eigs, which is very unreliable, so I have no interest in relying on svds in the middle of something like a nonlinear optimization. I'd for sure go with qr over svds. I'm willing to pay a computation time penalty for use of SVD instead of qr, but the "natural" penalty is jacked way up due to having to take full of the matrix.
Yhanks.
Best Answer