Condition number of Hilbert matrix depending on MATLAB build??
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Alessandro Russo
am 6 Jan. 2021
Kommentiert: Alessandro Russo
am 6 Jan. 2021
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 Kommentare
Bjorn Gustavsson
am 6 Jan. 2021
Sure thing:
2.121145569096015e+18
With matlab version 2020a in Ubuntu.
Akzeptierte Antwort
Bruno Luong
am 6 Jan. 2021
Bearbeitet: Bruno Luong
am 6 Jan. 2021
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'."
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Hilbert and Walsh-Hadamard Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!