Hi all,
I'm trying to do a very simple plot of E field as a function of theta with 0 <= theta >= 90 for the following E field:
E = exp(-1j*k*(r-(a/2)*sin(theta)))+exp(-1j*k*(r+(a/2)*sin(theta)));
I've attached a picture of the E function in handwriting which may be easier to see... (I hope my express above matches)
Here is my code (assumptions made are that E\(_{}o\): is 1 and a/r =0, i.e., r >> a... also k = \(\beta\))
r = 1000;
lam = 1;
a = lam/4;
k = 2*pi/lam;
theta = 0:5:90;
x = exp(-1j*k*(r-(a/2)*sin(theta)))+exp(-1j*k*(r+(a/2)*sin(theta)));
plot(theta,x);
xlabel('theta');
ylabel('E');
Is this correct?
Thanks a lot everyone
I'm trying to do a very simple plot of E field as a function of theta with 0 <= theta >= 90 for the following E field:
E = exp(-1j*k*(r-(a/2)*sin(theta)))+exp(-1j*k*(r+(a/2)*sin(theta)));
I've attached a picture of the E function in handwriting which may be easier to see... (I hope my express above matches)
Here is my code (assumptions made are that E\(_{}o\): is 1 and a/r =0, i.e., r >> a... also k = \(\beta\))
r = 1000;
lam = 1;
a = lam/4;
k = 2*pi/lam;
theta = 0:5:90;
x = exp(-1j*k*(r-(a/2)*sin(theta)))+exp(-1j*k*(r+(a/2)*sin(theta)));
plot(theta,x);
xlabel('theta');
ylabel('E');
Is this correct?
Thanks a lot everyone
Attachments
-
16.5 KB Views: 23
Last edited: