Filter löschen
Filter löschen

how cdsc values?

1 Ansicht (letzte 30 Tage)
H
H am 5 Okt. 2019
Kommentiert: Stephen23 am 27 Nov. 2019
s
  1 Kommentar
Stephen23
Stephen23 am 27 Nov. 2019
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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Sulaymon Eshkabilov
Sulaymon Eshkabilov am 5 Okt. 2019
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 Kommentare
H
H am 5 Okt. 2019
Could you explain why you put "deg2rad" with the second exp?
Sulaymon Eshkabilov
Sulaymon Eshkabilov am 5 Okt. 2019
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov am 6 Okt. 2019
Bearbeitet: Sulaymon Eshkabilov am 27 Nov. 2019
Hi,
Good luck.

Kategorien

Mehr zu Two y-axis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by