How to use lapack in matlb to solve large eigenvalue problem

Dear all,
If the matrices K and M are so larger, the computation in matlab will take a long time. How ro solve this problem. Somebody tell me use lapack is ok? is there some tutorials for the use lapack in matlab. I only want to solve thie problem in lapack, and the eigenblued and bector will send back to matlb fot postprocessing.

Answers (2)

If you are well versed in the LAPACK functions and just need an interface, you can use this package from the FEX by Tim Toolan:

4 Comments

Sorry. I am not versed with the lapack functions. Can you guid me for the eigenvalue problem for the matrices K and M.
Thank you.
So, the only reason you want to use LAPACK directly is because you think you might be able to do the problem faster than native MATLAB? But you don't know anything about LAPACK? Is this true?
Let me rephrase James' answer: If you are not well versed in the LAPACK functions, you cannot use any package to call it efficiently. Let Matlab decide which LAPACK functions it calls internally.
yes. Now i only want to solve the large matrix eigenvalue probelm quickly. Thank you.

Sign in to comment.

Matlab calls optimized LAPACK already. It chooses a suiting routine already and handles exceptions efficiently. For large data most of the time is spent inside the LAPACK functions itself, therefore the overhead caused by Matlab is tiny to negligible. Only if you have a lot of experiences with LAPACK and your matrix has a very specific structure (e.g. a sparse block matrix with known distribution of zeros), using specific LAPACK calls to solve the subsystems will be faster. But such techniques are prone to errors and you have to prove the numerical stability at first.

5 Comments

ok. i know. thank you for your advice. But i can not find any example for solve eigenvulae problem. Can you give me some example for matlab with lapack? thank you b=very much
i use the eig(KK,MM). but when the dimension of the KK and MM is large, the solution is slower. I want to use some function of lapack to solve this problem? Thank you
Solving a large eigenvalue problem consume a lot of time, because a lot of calculations are required. The eig() command suggested by Sean calls LAPACK routines already. As long as the system does not have a well known sparse structure, there is no better way.
It is important to mention the dimensions exactly: While for some scientists a 100x100 matrix is called "large" already, others work with 1e6x1e6 matrices. In the later case it is often not required to know all eigenvalues, but the largest 1000 are sufficient already.
To summarize, when you want to solve a general eigenvalue problem in Matlab, buying a faster processor is the most efficient way for improvements - as long as the computer has enough RAM such that the very expensive disk swapping ("virtual memory") can be avoided.
as your meaning the eig command is ok. need more efficient processor. But for the http://www.mathworks.com/matlabcentral/fileexchange/16777-lapack, how to use this one to solve eigenvalue problem? thanks

Sign in to comment.

Categories

Find more on Linear Algebra in Help Center and File Exchange

Asked:

on 6 Dec 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!