Condition number of Hilbert matrix depending on MATLAB build??
3 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am a teacher of Numerical Analysis and one of my student noticed that the condition number of the 20x20 Hilbert matrix computed by his MATLAB is different from the one obtained by mine. The MATLAB command given is
clear; format long e; cond(hilb(20))
My result is
2.106530558070438e+18
while the student's result is
5.194395744359904e+19
I asked other students to try, and about ten of them got my result (2.1e+18) but one of them got another different result:
1.531575599359190e+18
I know that the Hilbert matrix is terribly ill-conditioned, so very sensistive to even slighest changes in the algorithms, but I do not expect that different instances of MATLAB give different results. Any explanation? I have also collected the output of the ver command, but it is not very illuminating. Could you please try the experiment yourself?
Thanks
Alessandro
2 件のコメント
Bjorn Gustavsson
2021 年 1 月 6 日
Sure thing:
2.121145569096015e+18
With matlab version 2020a in Ubuntu.
採用された回答
Bruno Luong
2021 年 1 月 6 日
編集済み: Bruno Luong
2021 年 1 月 6 日
You and the students should NOT expect COND returns identical result, especially for ill-conditionned matrix like Hilbert matrix. COND invokes SVD and the document here is what one can read officially
"Different machines and releases of MATLAB can produce different singular vectors that are still numerically accurate. Corresponding columns in U and V can flip their signs, since this does not affect the value of the expression A = U*S*V'."
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!