Only the real part of the complex number is displayed
6 次查看(过去 30 天)
显示 更早的评论
When I have a complex number as an output, Mtalab either doesn't display the number or only shows the real part. Any idea how can I fix that
3 个评论
采纳的回答
Steven Lord
2021-1-13
I believe you're using the bank display format (format bank) which does not show the imaginary parts of numbers. What would $4.56i represent?
A = [1 -2; -3 4]
format
sqrt(A) % shows imaginary part in default format, format short
format bank
sqrt(A) % shows in bank format
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!