I use LAPACK dgesvd to calculate the SVD of the Hankel real matrix as part of my C program and compare the results obtained with the SVD MATLAB function. I notice that although the worst difference between singular values is of the order of 10 ^ -6 or 10 ^ -7 for different cases (which is not so bad); as the matrix size increases, the worst difference between the left and right singular vector matrices from LAPACK and MATLAB begins to increase, reaching ~ 0.08. From what I could find, MATLAB also uses the dgesvd internal function. Could someone explain to me what will lead to large differences between the singular vector and why these differences are not reflected in the singular values? MATLAB may do some preconditions to improve its accuracy. Any suggestions for me to improve accuracy,received from LAPACK?
Side notes: the condition number of the matrix as a whole worsens as the size of the matrix grows, reaching about 10 ^ 10 for a 400x400 matrix. In addition, I can confirm that the MATLAB solution is more accurate if you find the difference between the matrix and USV 'for both approaches. Although the accuracy of the MATLAB solution is always 10 ^ -11 or better; that received from LAPACK is always worse than 10 ^ -5, in the worst case - about 0.0177. Finally, even for the largest matrix under test, the order of 10 ^ -5 is of the least importance, which is actually not so small compared to the accuracy of the machine.
source
share