polyeig calculating few polynomial eigenvalue

조회 수: 5 (최근 30일)
Waqar Ahmed
Waqar Ahmed 2024년 10월 24일
댓글: Christine Tobler 2025년 1월 8일
The eigs routine calculate only few eigenvalues compared to eig. How can few polynomial eigenvalue be calculated rather than all using polyeig?
  댓글 수: 2
Raghava S N
Raghava S N 2024년 10월 24일
Could you share more details about the code you are working with? That will help in diagnosing the issue better.
Fabre François
Fabre François 2024년 12월 9일
A solution would be to linearize the eigenvalue problem and use eigs.

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

채택된 답변

Bruno Luong
Bruno Luong 2024년 10월 24일
I'm affraid there is no equivalent of EIGS to POLYEIG (vs EIG).

추가 답변 (1개)

Christine Tobler
Christine Tobler 2025년 1월 8일
While there is no equivalent to eigs for polyeig, if you just need some eigenvalues, you could step through polyeig.m and get what you need.
In the first step, polyeig takes the input matrices and computes a generalized eigenvalue problem of size n*p (where the inputs to polyeig were p+1 matrices of size n). Then, it simply calls eig on this generalized eigenvalue problem. At this point, you could instead call eigs with any number of eigenvalues you want to compute.
If you just need the eigenvalues, you're done at this point - the eigenvalues returned by eig are the eigenvalues of the polynomial eigenvalue problem. If you also need the eigenvectors, you would have to adapt the contents of the "if nargin > 2" branch in polyeig.m to only loop over as many eigenvectors as have been computed, instead of over all eigenvectors like is done in polyeig.
  댓글 수: 2
Christine Tobler
Christine Tobler 2025년 1월 8일
You would want to use sparse matrices instead of dense for computing A and B (speye instead of eye to initialize A, and sparse(nB, nB) instead of zeros(nB).
Christine Tobler
Christine Tobler 2025년 1월 8일
Since this has come up once or twice before, I've written a quick modification of the polyeig.m shipped with MATLAB so that it calls eigs to compute just a few eigenvalues and eigenvectors. This takes a cell array of the matrices passed to polyeig, followed by k, and optionally any additional inputs for eigs.
This is just a quick-and-dirty prototype, no guarantees here. But it should hopefully be easier to try this out than follow along my explanation above.

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

카테고리

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