Why does Matlab give different eigenvalues for the same matrix?

Dear all,
I am computing the eigenvalues for a generalized problem with shift inverted using the function eigs. The problem is that if I repeat the calculation with the same matrices I obtain different eigenvalues. For example: -5.87e-4 + i 1.677622 and 1.105e-3 + i 1.679422. What does it depend on? Have you ever experienced such a behaviour?
Thaks,
Nora

답변 (2개)

John D'Errico
John D'Errico 2015년 5월 28일
You are using eigs. For some eigenvalues, those estimates can vary, because eigs uses a random start.
If you insist on getting a deterministic result, you will need to either
1. Use eig, which does not use a random start.
2. Use eigs, but set v0. From the help, we see:
eigs(A,K,SIGMA,OPTS) and eigs(A,B,K,SIGMA,OPTS) specify options:
...
OPTS.v0: starting vector [N-by-1 vector | {randomly generated}]
...

댓글 수: 1

Yes, I was thinking about that. I'll try to assign a starting vector v0.

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

Thorsten
Thorsten 2015년 5월 28일

0 개 추천

Are you 100% sure that you used the same matrix for your computations?

댓글 수: 3

Yes, I am.
Could you save the matrix as matfile and post, including the code that reproduces the different eigenvalues?
It is a very big matrix. I'll try to post it.

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

카테고리

도움말 센터File Exchange에서 Linear Algebra에 대해 자세히 알아보기

질문:

2015년 5월 28일

댓글:

2015년 5월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by