Display text string if eigenvalue is complex?
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Eigenvalues & Eigenvectors finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!