Imaginary Number Notation/ Formatting Real and Complex Results
Ältere Kommentare anzeigen
Hello,
I am performing an eigenvalue calculation for a range of 10 numbers. One of these numbers are negative which results in a complex eigenvalue but the remainder are real numbers. I want to display these to the screen as results, however, when I do this the notation for the real values solutions occur as, for example, "3.464+0i" when it should just be "3.464". My 9th element in the calculation appears as how I want it "0+6.0598e-09i" and I would like to keep it this way. Is there a solution to this or do I just have to deal with the formatting?
Thanks,
Kyle
Akzeptierte Antwort
Weitere Antworten (1)
madhan ravi
am 19 Okt. 2020
Bearbeitet: madhan ravi
am 19 Okt. 2020
The imaginary part might not be exactly zero.
vpa(Answer)
Kategorien
Mehr zu Matrix Computations finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!