% plot radiation pattern of dipole
theta=[-pi:.01:pi];
rho_hd=sin(theta);
rho_hw=cos(0.5*pi*cos(theta))./sin(theta);
rho=rho_hd.^2;
rho=rho_hw.^2;
rho=10*log10(rho_hw.^2)+30;
rho=abs(rho_hw);
polar(theta,rho);
