how cdsc values?

조회 수: 2 (최근 30일)
H
H 2019년 10월 5일
댓글: Stephen23 2019년 11월 27일
s
  댓글 수: 1
Stephen23
Stephen23 2019년 11월 27일
Original question from Google Cache:
"how to create 3D plot of equation with complex values?"
I was wondering how I could plot (3D) the following equation:
image.png
Here, j indicates complex value.
3 planes for plotting would be: x, y, and the real part of E.

댓글을 달려면 로그인하십시오.

채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019년 10월 5일
hi,
In your exercise, it is easier to use: real() and imag() to separate out the real and imag parts of E. E.g.
[x, y]=meshgrid(linspace(-pi, pi), linspace(-5, 5));
E = exp(-j*x*cosd(169)+y*sind(169)).*exp(deg2rad(311j));
subplot(211); mesh(x,y,real(E)); title('Real part of E');subplot(212); mesh(x,y,imag(E)); title('Imaginary part of E')
Good luck
  댓글 수: 2
H
H 2019년 10월 5일
Could you explain why you put "deg2rad" with the second exp?
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019년 10월 5일
From your given exercise contexts, it seems to have the values in radians not in degrees and thus deg2rad conversion is used. If you'd need to get in degrees, then remove deg2rad().
Good luck.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019년 10월 6일
편집: Sulaymon Eshkabilov 2019년 11월 27일
Hi,
Good luck.

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by