Why does LAPACK called from my C code fail to calculate eigenvalues when MATLAB works fine for the same matrices?
1 view (last 30 days)
Show older comments
I am trying to call LAPACK libraries from my C code to calculate eignevalues of matrices. Most of the times my results from C match with the results from MATLAB. However, for some matrices LAPACK called from C fails. I am surprised because MATLAB works just fine. In the documentation, it is explicitly mentioned that MATLAB uses LAPACK to calculate eigenvalues. I want to know if there are any balancing or other optimizations going on which might be causing this fix.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
The reason you are getting different behaviors from MATLAB and C is that you might be using different LAPACK versions. If you are using a version of LAPACK other than the version which we ship with MATLAB, you may expect such issues.
MATLAB uses a modified version of LAPACK. All the changes made by MathWorks have been submitted to LAPACK. The latest version of LAPACK contains all but one of our changes in the QZ algorithm.
0 Comments
More Answers (0)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!