Obtain eigenvalue from matrix and known eigenvector
Ältere Kommentare anzeigen
I have a matrix A and a known eigenvector x. I am struggling to come up with an way of obtaining the eigenvalue of x with a relatively simple operation. One option is the following code:
A*x./x
However, this has problems when x contains any 0 entries. Is there any easy way of accomplishing this?
Akzeptierte Antwort
Weitere Antworten (1)
David Goodmanson
am 10 Jun. 2019
Bearbeitet: David Goodmanson
am 10 Jun. 2019
Hi Henry,
you can find the indices where x = 0 and cast those entries out of both x and the corresponding rows and columns of A.
x1 = x; % temporary copies
A1 = A;
ind = x1==0;
x1(ind) = [];
A1(:,ind) = [];
A1(ind,:) = [];
(A1*x1)./x1
In practice, the zero check might have to be something like ind = abs(x) < 1e-6 or whatever an appropriate tolerance would be.
Kategorien
Mehr zu Linear Algebra finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!