美文网首页
矩阵的秩(rank(A))计算机计算

矩阵的秩(rank(A))计算机计算

作者: 寽虎非虫003 | 来源:发表于2022-09-05 15:45 被阅读0次

参考

计算机是如何求矩阵的秩的?

MATLAB解释

rank uses a method based on the singular value decomposition, or SVD. The SVD algorithm is more time consuming than some alternatives, but it is also the most reliable.
The rank of a matrix A is computed as the number of singular values that are larger than a tolerance. By default, the tolerance is max(size(A))*eps(norm(A)). However, you can specify a different tolerance with the command rank(A,tol).

秩使用一种基于奇异值分解的方法,或SVD。SVD算法虽然比其他算法更耗时,但也是最可靠的算法。
矩阵a的秩是根据奇异值大于容差的个数来计算的。缺省情况下,公差为max(size(A))*eps(norm(A))。但是,您可以使用命令级别(a,tol)指定不同的容忍范围。

计算

tol = max(size(A))*eps(norm(A)) | scalar
rank(A,tol)

或者

s = svd(A);
tol = max(size(A))*eps(max(s));
r = sum(s > tol);

下面这个就是上面的原理。

相关文章

网友评论

      本文标题:矩阵的秩(rank(A))计算机计算

      本文链接:https://www.haomeiwen.com/subject/pjolnrtx.html