In sparse matrix eigs(A,k,sigma), how to specify both shift and direction

13 vues (au cours des 30 derniers jours)
The documentation writes:
eigs(A,k,sigma), where A is the sparse matrix, k is the number of eigenvalues and sigma can be scalar or discriptive flag like 'sm'.
However, is it possible to both set the sigma shift andthe direction of eigenvalue?
For example, I want to find the largest real eigenvalue after shift sigma, it seems that I need to both assign sigma to be the value of shift(like (A-sigma*I)^-1 in ARPACK) and sigma to be 'lr'. But how to acheive this since I can only give one sigma value?
The reason that I want to acheive this is because I want to find the eigenvalue that is closest to sigma but also larger than sigma.

Réponse acceptée

Christine Tobler
Christine Tobler le 3 Avr 2019
With a numeric sigma, EIGS uses a linear system solve (A-sigma*I)\v instead of A*v to compute the largest eigenvalues of the inverse of A. You can do this directly by calling
[U, D] = eigs(@(x) A\x, size(A, 1), k, 'largestabs');
D = diag(1./diag(D));
which is equivalent to the call
[U, D] = eigs(A, k, 'smallestabs');
The first call can be changed to return only the largest real instead of the largest absolute value, by simply replacing 'largestabs' with 'largestreal' (note: If your MATLAB version is older than R2017b, use 'lm', 'sm', instead of 'largestabs' and 'smallestabs', and either 'la' or 'lr' instead of 'largestreal'). After inverting, this translate to find the eigenvalues with smallest (positive) real difference to the sigma.
Also, the call to A\x directly is very expensive, so you should compute a factorization and use that for the linear system solve instead.
In summary:
dA = decomposition(A);
[U, D] = eigs(@(x) dA\x, size(A, 1), k, 'largestreal');
D = diag(1./diag(D));
Caveats:
  • If sigma is to the right of the spectrum (that is, all eigenvalues have real part less than sigma), this method will find the leftmost eigenvalue, not the one closest to sigma.
  • The "largest real" algorithm is not as robust as the "largest abs" algorithm: There's a larger chance that some eigenvalues are not found even though they have the largest real part (particularly if another eigenvalue has a slightly smaller real part but much larger imaginary part).

Plus de réponses (0)

Catégories

En savoir plus sur Linear Algebra dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by