How to find a complex eigenvalue of a matrix

조회 수: 37 (최근 30일)
MM
MM 2019년 12월 17일
답변: MM 2020년 2월 3일
I want to find the highest complex eigenvalue of a matrix A. For example:
lambda = eig(A)
I'll get:
lambda =
2.6955 + 0.0000i
-1.1216 + 3.9723i
-1.1216 - 3.9723i
-1.7535 + 0.0000i
-0.1240 + 2.2553i
-0.1240 - 2.2553i
When I do:
[lambda_max, index_max] = max(real(lambda))
I'll get:
lambda_max =
2.6955
While I would like to have
-0.1240
How can I do this?
(sometimes the imaginairy part of complex eigenvalues can be zero)
  댓글 수: 10
Steven Lord
Steven Lord 2019년 12월 18일
I think the cplxpair function may be of interest to you in making sure the complex conjugate pairs are grouped together.
Walter Roberson
Walter Roberson 2019년 12월 18일
lambda = [
2.6955 + 0.0000i
-1.1216 + 3.9723i
-1.1216 - 3.9723i
-1.7535 + 0.0000i
-0.1240 + 2.2553i
-0.1240 - 2.2553i];
[uniquegroups, ~, group] = uniquetol([real(lambda), abs(imag(lambda))], 'byrows', true);
groupcounts = accumarray(group, 1);
maxeigreal = max(real(uniquegroups(groupcounts>1,:)));

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

채택된 답변

MM
MM 2020년 2월 3일
A bit late but I fixed it, I could do it without filtering the pairs

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by