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

3 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Christine Tobler
Christine Tobler il 25 Apr 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 Commenti
johnson wul
johnson wul il 21 Ago 2019
Hi , Christine thank you for the answer. Itwas very helpfull for me.
johnson wul
johnson wul il 21 Ago 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?

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by