Why does Matlab give different eigenvalues for the same matrix?
Afficher commentaires plus anciens
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
Réponses (2)
John D'Errico
le 28 Mai 2015
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 commentaire
Nora
le 28 Mai 2015
Catégories
En savoir plus sur Eigenvalues & Eigenvectors dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!