フィルターのクリア

Extracting eigenvalues and its eigenvector from a list.

1 回表示 (過去 30 日間)
John Smith
John Smith 2015 年 1 月 27 日
コメント済み: John Smith 2015 年 1 月 27 日
Suppose I have a list all eigenvalues and their corresponding eigenvectors. Is there such a function in MATLAB that allows me to extract(as an example) eigenvalues that are less than 5, so I can perform a calculation on the corresponding eigenvector?
I.e. I want to shorten my list of eigenvalues in a vector down to eigenvalues that are less than 5, and shorten my list of eigenvectors down to a smaller vector corresponding to only those eigenvalues from my new list. All the eigenvectors can be in one giant list. For example if there are two eigenvectors (1,2,3) and (4,5,6) then I want it as (1,2,3,4,5,6). Thanks.
  2 件のコメント
John D'Errico
John D'Errico 2015 年 1 月 27 日
Define what you mean by "a list". There is no construct in MATLAB by that name, so how can we help you?
I assume you have a vector that contains as elements a set of eigenvalues, call it E. You can find the indexes of those elements with eigenvalue less than 5 trivially.
ind = find(E<5);
Then do whatever you wish with them.
John Smith
John Smith 2015 年 1 月 27 日
編集済み: John Smith 2015 年 1 月 27 日
That is what I meant yes thanks. I'm still not sure how this helps me find a new shortened vector of eigenvectors though.
EDIT: I think I've got it now. I'll try it and report back later.

サインインしてコメントする。

採用された回答

Matt J
Matt J 2015 年 1 月 27 日
[V,D]=eig(yourMatrix);
d=diag(D);
idx=d<5;
eigenvalues=d(idx);
eigenvectors=V(:,idx);
  1 件のコメント
John Smith
John Smith 2015 年 1 月 27 日
I'll give this a try, thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEigenvalues and Eigenvectors についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by