How to calculate n-th eigenvector using eigs() function
조회 수: 3 (최근 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개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!