gain of center-fed linear dipole of length L
[g, th, c] = dipole(L,Nth);
dipole length in wavelengths
power gain evaluated at th
(Nth+1) equally-spaced polar angles in [0,pi]
gain normalization constant
dipole(L,Nth) computes gain of center-fed linear dipole of length L. computes g(th) = c * [(cos(pi*L*cos(th)) - cos(pi*L)) / sin(th)]^2, where c normalizes to unity maximum, Hertzian dipole: L=0 and Half-wave dipole: L=1/2