用五个元素绘制宽边天线的辐射方向图

时间:2018-11-30 19:25:25

标签: python python-3.x python-2.7

我正在尝试绘制天线的宽边辐射方向图 但我没有人能帮助我 broadside radiation pattern`

import math
from mpl_toolkits.mplot3d import axes3d 
import matplotlib.pyplot as plt

def ArrayFac(angletheta):
    #try to use EQ=sin((N/2)*psi)/((N/2)*PSI)  
    n=5
    d=1
    psi=2*math.pi*d*math.cos(angletheta)
    num=math.sin((n/2)*psi)
    deu=(n/2)*psi
    arrafac=num/deu
    return abs(arrafac)

fig = plt.figure()
ax = plt.axes(projection='3d')

for theta in range(181):
     ax.counter3d(0,theta,ArrayFac(theta))
     ax.legend()
ax.xlabel('x')
ax.ylabel('y')
ax.set_zlabel('z');
ax.show()

0 个答案:

没有答案