How to calculate n-th eigenvector using eigs() function

3 vues (au cours des 30 derniers jours)
Luqman Saleem
Luqman Saleem le 25 Avr 2019
Commenté : johnson wul le 21 Août 2019
I have a very big sparse matrix. I need all of its eigenvector and values. I can't store all of the eigenvector in one big matrix because it will require a lot of memory. I want to get all these eigenvectors one by one.
Is there any way by which I can get eigenvectors one by one in a for loop? i.e. in ith iteration I want the ith eigenvector and value

Réponse acceptée

Christine Tobler
Christine Tobler le 25 Avr 2019
There's no way of doing this directly, and the indirect ways are hard to implement and not very robust.
Also, this will be very slow: If there are more eigenvectors than you can store in memory, there are also more eigenvectors than you can compute in any sensible time frame (computing one (or a batch of 20) eigenvectors has a cost of about O(n^3), so the overall complexity of this would be O(n^4)). At a random guess, I'd say the runtime will be weeks.
1) You could get some idea of the eigenspectrum of your matrix using eigs' different options and then select a range of shifts in this eigenspectrum, and compute the eigenpairs closest to each shift in batches. You're likely to get some of the eigenvalues in more than one of these batches, which could be its own problem. You would also probably need to refine your shifts adaptively, as eigenvalues tend to cluster in some part of the eigenvalue spectrum.
2) If your matrix is banded, you could compute all its eigenvalues directly using d = eig(A). Then, compute (A - d(i)*I) \ rand(n, 1) to get a good estimate of the eigenvector associated with d(i). This is quite expensive, as it requires a factorization of A for each eigenvalue.
Could you say some more about why you need to compute all these eigenvectors?
  4 commentaires
johnson wul
johnson wul le 21 Août 2019
Hi , Christine thank you for the answer. Itwas very helpfull for me.
johnson wul
johnson wul le 21 Août 2019
If my matrix is for example 20*20 tridiagonals with coefficients depending on a unic parameter how could I plot the eigenvalues and eigenfunctions? I wanted to plot eigenvalue=f(parameter) and eigenvector=f(i,j)
I 've try, but my result gives me plot of eigenvalue=f(i)
could some one help me please?

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by