PDA

View Full Version : Eigenvalue decomposition/numerical error

pguerron
03-10-2009, 01:26 PM
Dear all,

I'm solving a system of equations using an eigenvalue decomposition technique. I use the ISML routines for eigenvctor (dgvcrg) and matrix inversion (dlincg). The result is almost correct except for one row in the solution matrix.
The code is enclosed, see main.f90. The solution starts in line number 174. The actual solution is stored in the matrices hxaux (line 308) and gxaux (line 310). This matrices differ with their counterparts from a solution in either matlab or mathematica in row #19. The rest of the solution is correct. I've written the code many times and get back to the same incorrect answer. Moreover, the logic behind the algorithm in fortran and matlab is the same.
Any suggestions what is wrong?

Thanks,

Pablo

Richard Hanson
03-11-2009, 09:50 AM
Thank you for including the code and data. This was useful to start analysis of the issue.

A computation of the SVD of your A and Bpablo matrices, discribing the generalized eigenvalue problem, show that both matrices are singlular. A has a rank of 38 and Bpablo has a rank of 28. The matrix size is 41. This is potentially a singular and ill-posed problem. See Golub and Van Loan, Ed. 3, p. 375-376. Also see the LAPACK user's guide

You should note that the results are returned as a pair of arrays alphar (complex) and betra (real). You then divide by betra to get your eigenvalues. But this makes sense only when all the betra are non-zero. In fact 3 of the betra are zero.

You also turn off all error messages. In fact your use of itmax1 in the call to DNEQNF was undefined. Suggestion: Use IMPLICIT NONE and type all your variables.

This issue here should probably be handled as a Post Sales Support matter, if the above comments do not provide insight.

A detailed response was added on March 19, 2009. See the PDF attached.

pguerron
03-15-2009, 06:46 AM
Dear Richard,

Thanks for taking your time to review my question. Thanks for pointing out that the matrices are near singular. What puzzles me is that matlab and mathematica can solve the problem but the ISML library cannot.
Can you tell me how to contact the post sale support? Thanks again,

Pablo

Richard Hanson
03-19-2009, 03:26 PM
A detailed response is provided. See forum_response.pdf.