Only the real part of the complex number is displayed
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Steven Lord
il 13 Gen 2021
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
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!