t=0:0.001:10;
z=0:0.0005:5;
eta=377;
theta=pi/2;
E0=50;
a=0;
f=600000000;
w=2*pi*f;
b=w*3.33*0.000000001;
E=E0/eta;
H=E*exp(-a*z).*cos(w*t-b*z-theta);
Ez=E0*exp(-a*z).*cos(w*t-b*z);
figure(1);
subplot(211),plot(z,H,'r');
xlabel('Dispalcement(metres)');
ylabel('Magnetic Field Intensity(H)');
title('Plane wave propagation in free space');
subplot(212),plot(z,Ez,'g');
xlabel('Dispalcement(metres)');
ylabel('Electric Field Intensity(H)');
title('Plane wave propagation in free space');
