Hi, does anyone knows which is the computational cost of getting the rank of a matrix through the rank(M) command? (It would be extremelly usefull to have the order of the command using the Big O notation.
Thank you in advance!
Nicolas

 採用された回答

Shanmukha Voggu
Shanmukha Voggu 2021 年 12 月 3 日
編集済み: Shanmukha Voggu 2021 年 12 月 3 日

0 投票

Hi Nicholas,
The Computational Complexity of the rank function is equal to svd function.
which is equal to O(max(m, n) * min(m, n)^2), where m and n are number of rows and columns of the matrix respectively
Refer this for more information.

5 件のコメント

Nicolas Mira Gebauer
Nicolas Mira Gebauer 2021 年 12 月 3 日
That helped a lot, thanks!
Christine Tobler
Christine Tobler 2021 年 12 月 3 日
Hi, I just realized I got that wrong in the Answers post you were referring to: The complexity is actually
O(max(m, n) * min(m, n)^2)
That is, for a square n-by-n matrix the complexity of RANK is cubic in n.
Shanmukha Voggu
Shanmukha Voggu 2021 年 12 月 3 日
Thanks for the information, I edited my answer to show up right complexity
Nicolas Mira Gebauer
Nicolas Mira Gebauer 2021 年 12 月 6 日
Thank you both for the clarification!
Walter Roberson
Walter Roberson 2021 年 12 月 6 日
I was wondering! max(m, n) *min(m, n) as was posted before is the same as m*n, and I couldn't figure out why someone would bother writing it the long way!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

製品

リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by