# how cdsc values?

2 views (last 30 days)
H on 5 Oct 2019
Commented: Stephen Cobeldick on 27 Nov 2019
s

#### 1 Comment

Stephen Cobeldick on 27 Nov 2019
"how to create 3D plot of equation with complex values?"
I was wondering how I could plot (3D) the following equation:
Here, j indicates complex value.
3 planes for plotting would be: x, y, and the real part of E.

Sulaymon Eshkabilov on 5 Oct 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));
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

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