How to get the numerical rank of the matrix in matlab?
11 views (last 30 days)
Bjorn Gustavsson on 22 Nov 2022
If you can afford it you might consider looking at the singular vaules that you obtain from the svd of your A-matrix. That will allow you to judge how many singular values are sufficiently larger than ϵ or not too small compared to the larges singular value. That's how I judge how much information I can extract from a system of equations - if I can afford/manage the svd.
More Answers (1)
John D'Errico on 22 Nov 2022
To compute the numerical rank of a matrix, use rank. Surely that seems logical. And you even know about rank.
Bu then you seem to be askign about what if you have a tolerance. But then surely, you should have read the help for rank! Rank accepts a tolerance as an option. So, while you COULD use svd, looking at the singular values, and comparing them carefully to your tolerance and how that all combines with the maximum singular vlaue, all you needed to use is rank in the first place. It already does the work for you, including alllowing you to provide a tolerance. (You do NOT just compare the small singular value to an absolute tolerance, as the largest singular value is hugely important here.)