Plotting polarization of EM waves in Matlab

1 reply · 3K views · last reply
yefj
Messages
166
Reaction score
2
Homework Statement
plotting EM polarized wave in matlab
Relevant Equations
polarization ellipse
Hello , there is a polarization matix I want to implement in matlab.
I have build a basic matlab plot which could visualize EM waves in 3D.
The basic equations described in equation 2.5.1 from the attached link.
given the simple case of linear polarization, What is the strategy of plotting 2.5.1 EM representation like in the photo below?
Thanks.
https://eceweb1.rutgers.edu/~orfanidi/ewa/ch02.pdf
Equations 2.5.1 and 2.5.2: complex form E(z,t) = (x̂ A e^{jφa} + ŷ B e^{jφb}) e^{jωt-jkz}, then real components Ex(z,t) = A cos(ωt - kz + φa) and Ey(z,t) = B cos(ωt - kz + φb).

Diagram of a forward uniform plane wave along the z axis, with a sinusoidal electric field E and magnetic field H drawn perpendicular to each other and to z, wavelength λ marked, Fig. 2.2.1.

[CODE lang="matlab" title="matlab 3D wave plot"]clc
clear
x = linspace(0,4*pi,100);
figure;
plot3(x,zeros(1,100),zeros(1,100),'k','LineWidth',2);
hold on
plot3(x,-sin(x),zeros(1,100),'k');
plot3(x,zeros(1,100),sin(x),'k');
x_quiver = 0:pi/4:4*pi;
q1 = quiver3(x_quiver,zeros(1,17),zeros(1,17),zeros(1,17),-sin(x_quiver),zeros(1,17),0);
q2 = quiver3(x_quiver,zeros(1,17),zeros(1,17),zeros(1,17),zeros(1,17),sin(x_quiver),0);
hold off;
[/CODE]
 
Attachments
  • Equations 2.5.1 and 2.5.2 for a plane wave E(z,t) with x and y components: E = (x̂A e^(jφa) + ŷB e^(jφb)) e^(jωt−jkz), its real-part form, and Ex = A cos(ωt − kz + φa), Ey = B cos(ωt − kz + φb).
    1731053931940.png
    19.1 KB · Views: 106