Chapter 7: Antenna Synthesis and Continuous Sources

Example 7.1, Page no. 392

In [1]:
#In this example the values of a1,a2,a3,a4 are found
#the values of z1 z2 z3 are substituted in the equation AF=(z-z1)(z-z2)(z-z3)
a1=-1
a2=1
a3=-1
a4=1
print "The values of a1, a2, a3 and a4 are %d, %d, %d and %d respectively"%(a1,a2,a3,a4)
The values of a1, a2, a3 and a4 are -1, 1, -1 and 1 respectively

Example 7.3, Page no. 398

In [26]:
import numpy as np
import scipy.integrate as integrate
a=np.zeros(11)
for m in range(0,11):
    a[m]=integrate.quad(lambda x: exp(-1j*m*x) , (-pi/sqrt(2)) , (pi/sqrt(2)))[0]
maxval = a[0]
for i in range(0,11):
    if maxval<a[i]:
        maxval = a[i]

print 'Normalized Co-efficients:';
for i in range(0,11):
    a[i]=a[i]/maxval
    print 'a',i,':',a[i]
Normalized Co-efficients:
a 0 : 1.0
a 1 : 0.358187786013
a 2 : -0.216954294377
a 3 : 0.0558163210177
a 4 : 0.0577652398568
a 5 : -0.0894712295755
a 6 : 0.0518110265309
a 7 : 0.0101104236117
a 8 : -0.0495750638142
a 9 : 0.0455187541912
a 10 : -0.00996721500244
In [ ]: