How to calculate n-th eigenvector using eigs() function
2 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
採用された回答
Christine Tobler
2019 年 4 月 25 日
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 件のコメント
johnson wul
2019 年 8 月 21 日
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?
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!