displaying complex numbers

19 Ansichten (letzte 30 Tage)
Edward
Edward am 23 Mär. 2012
Kommentiert: Apoorv Somkuwar am 17 Sep. 2020
how do you display a complex number

Antworten (2)

Wayne King
Wayne King am 23 Mär. 2012
z = 1+1j
quiver(0,0,real(z),imag(z))
is one way, so that
z = 1+1j;
w = 3-1j;
quiver(zeros(2,1),zeros(2,1),real([z w]'),imag([z w]'))
xlabel('Re(z)'); ylabel('Im(z)');
  1 Kommentar
Apoorv Somkuwar
Apoorv Somkuwar am 17 Sep. 2020
My command prompt displays only Re(z)
If I write z = 1+5i, the workspace will store z = 1+5i but my command prompt displays it as z = 1.
How do I change this?
TIA

Melden Sie sich an, um zu kommentieren.


Bill Kersting
Bill Kersting am 20 Jul. 2018
A matrix consists of complex elements. How do I display the elements of the matrix in decimal form rather than scientific form?
  3 Kommentare
Bill Kersting
Bill Kersting am 21 Jul. 2018
My problem is I am an doing power system analysis and have voltages in the magnitude near 8000. This is actually a vector. I can display the real and imaginary parts but they come out in scientific notation. I want to display like 7500 volts at an angle of 30.00 degrees For a three-phase system the vector will be three deep each with a desired magnitude and angle.
vineel chandra
vineel chandra am 5 Apr. 2019
if complex number is x
fprintf('%f+i%f \n',real(x),imag(x));

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by