displaying complex numbers
이전 댓글 표시
답변 (2개)
Wayne King
2012년 3월 23일
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
Apoorv Somkuwar
2020년 9월 17일
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
Bill Kersting
2018년 7월 20일
0 개 추천
A matrix consists of complex elements. How do I display the elements of the matrix in decimal form rather than scientific form?
댓글 수: 3
Steven Lord
2018년 7월 21일
If your matrix is a symbolic matrix (its class is sym) use vpa.
If your matrix is a numeric matrix (its class is double or single) use the format function. FYI format only changes how the matrix is displayed, not how it is stored or how it is used in computations.
Bill Kersting
2018년 7월 21일
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
2019년 4월 5일
if complex number is x
fprintf('%f+i%f \n',real(x),imag(x));
카테고리
도움말 센터 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!