Condition number of Hilbert matrix depending on MATLAB build??
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alessandro Russo
el 6 de En. de 2021
Comentada: Alessandro Russo
el 6 de En. de 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 comentarios
Bjorn Gustavsson
el 6 de En. de 2021
Sure thing:
2.121145569096015e+18
With matlab version 2020a in Ubuntu.
Respuesta aceptada
Bruno Luong
el 6 de En. de 2021
Editada: Bruno Luong
el 6 de En. de 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'."
Más respuestas (0)
Ver también
Categorías
Más información sobre Hilbert and Walsh-Hadamard Transforms en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!