Difference between eigs and eig

92 次查看(过去 30 天)
Quantum
Quantum 2014-4-23
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