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 で Creating and Concatenating Matrices についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!