Matlab doesn't show imaginary part of complex numbers for me!

4 views (last 30 days)
i'm new to matlab and whenever i try to display a complex number in matlab, it doesn't show the imaginary part of the complex number! what should i do with this issue? you could see the problem in the following picture:

Accepted Answer

Walter Roberson
Walter Roberson on 17 Feb 2022
You have format bank in effect. Use
format short

More Answers (1)

Jan
Jan on 17 Feb 2022
Do you see the 2 trailing zeros? This looks like the "bank" format:
format long g
pi + 2i
ans =
3.14159265358979 + 2i
format bank
pi + 2i
ans =
3.14
Solution: Do not use the "bank" format. See: doc format

Categories

Find more on Filter Banks in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!