Difference between eigs and eig

조회 수: 88 (최근 30일)
Quantum
Quantum 2014년 4월 23일
답변: Walter Roberson 2016년 4월 11일
Hello,
I am unable to understand the eigs function. The documentation states that eigs(A,k,sigma) returns 'k' eigen values/vectors of A closest to 'sigma'.
  1. When I call it for different values of 'k', the returned eigenvalues change considerably. For example, my expectation is that eigs(A,3,0) should share 2 eigenvalues returned by eig(A,2,0)
  2. Second, the values returned are considerably different from those returned by eig.
Is this behavior expected? I will appreciate if someone could explain.
Thank you.
Best regards

답변 (5개)

Quantum
Quantum 2014년 4월 23일
Honestly, it doesn't answer the question.
Anyone else please.
Thank you.
  댓글 수: 1
Geoff Hayes
Geoff Hayes 2014년 4월 23일
Hi Quantum,
The documentation for eigs states that the input matrix A should be square and sparse, and in the Tips section:
d = eigs(A,k) is not a substitute for
d = eig(full(A))
d = sort(d)
d = d(end-k+1:end)
So it is understood that the two may produce different results.
As for your first question, I agree with you that the there should be two shared eigenvalues when k is increased from 2 to 3. I have observed that for a couple of the examples that I tried. Could you post your example (A matrix) where the eigenvalues change considerably?
Geoff

댓글을 달려면 로그인하십시오.


Andrew Knyazev
Andrew Knyazev 2015년 5월 15일
Is this behavior expected?
- Yes. Eigs uses a tricky method that may give the results you describe, especially for funny matrices.

Juan Garcia
Juan Garcia 2015년 12월 8일
As far as I know the difference is because eigs use iterative methods to calculate ther eigenmodes, being ther error bigger in the last calculated eigenmodes. If you request more eigenmodes, you should check that only the last differ. Regards

Manish Waykole
Manish Waykole 2016년 4월 11일
If you have checked this then let it pass. I had faced a similar problem, if you are passing the following syntax eigs(A) then it gives largest 6 eigen values by default. To get more of the eigen values use eigs(A,9) *here 9 is an example denoting that you need 9 eigen values arranged in descendin order.
Note: In descending order. All the values are in descending order on contrary to eig command which acc. to my knowledge gives eigen values in ascending order
I have a question, what kind of eigen vector is obtained. I have a input of the form eigs(A,B,5,'sm') implying that I need 5 smallest eigen values. Here as far as I can see the eigen vector generated also has 5 rows so it is incomplete. Incomplete in the sense that I need it(whole of it almost 16 eigen values are present) in my further calculations.

Walter Roberson
Walter Roberson 2016년 4월 11일

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by