Display text string if eigenvalue is complex?
이전 댓글 표시
Hi,
I am using the basic eigensolver function to compute the eigenvalues of matrix A and define them in matrix L as follows:
%Define value of A
A=input('Enter Values for Matrix "A" in form [a b;x y]:')
%Calculate eigenvalues of A
L=eig(A);
As any matrix which could produce complex eigenvalues is not a valid input for this scenario, I would like to be able to display a text string and return the user to a point at which matrix A can be redefined if a complex result is computed.
Any advice on how to do this would be greatly appreciated, this is my first foray into the world of Matlab.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Eigenvalues & Eigenvectors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!