%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This file plots the polarization state % the field is plotted at z=0 so the exp(-jkz)=1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The complex electric field terms % Since these are phasors the exp(jwt) is implied ex=1; ey=exp(-j*29.252*pi) %the time in terms of periods tt=linspace(0,1.95*pi,201); extot=[]; eytot=[]; for lpt=1:length(tt) %loop through the various time steps t=tt(lpt); figure(1) clf %convert to time domain Ex=1/sqrt(abs(ex)^2+abs(ey)^2)*real(ex*exp(j*t)); Ey=1/sqrt(abs(ex)^2+abs(ey)^2)*real(ey*exp(j*t)); %save the envelope of the e-field extot=[extot,Ex]; eytot=[eytot,Ey]; %plot the polarization plot(extot,eytot,':') %the envelope hold plot([0,Ex], [0,Ey]) %the field vector hold axis([-1 1 -1 1]) axis square xlabel('x') ylabel('y') end