Imaginary Number Notation/ Formatting Real and Complex Results
显示 更早的评论
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
采纳的回答
更多回答(1 个)
madhan ravi
2020-10-19
编辑:madhan ravi
2020-10-19
The imaginary part might not be exactly zero.
vpa(Answer)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Computations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!