Wrong output from eigs function

15 Ansichten (letzte 30 Tage)
Matteo Aluffi
Matteo Aluffi am 4 Dez. 2020
Kommentiert: Ameer Hamza am 4 Dez. 2020
I've been having problmens when using the eigs command. So i tried just tiping [A,V]=eigs(eye(10)) where i expected two identity matrices as output. Except that it returns two 10x6 matrices whose non zero input are not even one. What am i doing wrong?

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 4 Dez. 2020
Bearbeitet: Ameer Hamza am 4 Dez. 2020
According to the documentation of eigs(), by default, it returns 6 largest eigenvalues and their corresponding eigenvectors. Matrix V contains the eigen values along the diagonal, whereas matrix A contains six eigen vectors, one in each column.
  3 Kommentare
KALYAN ACHARJYA
KALYAN ACHARJYA am 4 Dez. 2020
Bearbeitet: KALYAN ACHARJYA am 4 Dez. 2020
@Ameer Thanks, at first glance, I didn't see it.
d = eigs(A) %returns a vector of the six largest magnitude eigenvalues of matrix A
More:
d = eigs(A,k) returns the k largest magnitude eigenvalues.
Ameer Hamza
Ameer Hamza am 4 Dez. 2020
Yes, that correct. In Matteo's case, following two will be same
[A,V]=eig(eye(10))
% or
[A,V]=eigs(eye(10),10)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Linear Algebra finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by