Imaginary Number Notation/ Formatting Real and Complex Results
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
madhan ravi
el 19 de Oct. de 2020
Editada: madhan ravi
el 19 de Oct. de 2020
The imaginary part might not be exactly zero.
vpa(Answer)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!