Imaginary Number Notation/ Formatting Real and Complex Results
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
madhan ravi
le 19 Oct 2020
Modifié(e) : madhan ravi
le 19 Oct 2020
The imaginary part might not be exactly zero.
vpa(Answer)
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!