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?

 채택된 답변

Ameer Hamza
Ameer Hamza 2020년 12월 4일
편집: Ameer Hamza 2020년 12월 4일

0 개 추천

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

Matteo Aluffi
Matteo Aluffi 2020년 12월 4일
I solved thanks. Didn't know that there were both eig and eigs commands. Using eig it works fine
KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 12월 4일
편집: KALYAN ACHARJYA 2020년 12월 4일
@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.
Yes, that correct. In Matteo's case, following two will be same
[A,V]=eig(eye(10))
% or
[A,V]=eigs(eye(10),10)

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

질문:

2020년 12월 4일

댓글:

2020년 12월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by