⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sa_fig4_27.m

📁 这个是英文版<<Smart Antennas for Wireless Communications>>配套的matlab源程序
💻 M
字号:
%Smart Antennas Figure 4.27  kaiser weighted planar square array.   
%  N elements in the x and in the y directions
%  spacing dx=dy=d.   Kaiser bessel weights with alpha=3.  
%  Beamsteered to theta0=45, phi0=45.
d=.5;
N=8; 
th0=pi/6;
ph0=pi/4;
th1=pi/4;
ph1=pi/3;
th2=pi/4;
ph2=pi/6;
th=[0:150]*pi/300;
ph=[0:150]*2*pi/150;
[Th,Ph]=meshgrid(th,ph);
AFn=[zeros(151,151)];
test=kaiser(N,3);
wB=test/max(test);

AFx=[zeros(151,151)];
AFy=[zeros(151,151)];
tot=sum(wB);
for i=1:N
    AFx=AFx+wB(i)*exp(-1j*(i-1)*2*pi*d*(sin(Th).*cos(Ph)-sin(th0).*cos(ph0)));
    AFy=AFy+wB(i)*exp(-1j*(i-1)*2*pi*d*(sin(Th).*sin(Ph)-sin(th0).*sin(ph0)));
end
for i=1:N
    AFx=AFx+wB(i)*exp(-1j*(i-1)*2*pi*d*(sin(Th).*cos(Ph)-sin(th1).*cos(ph1)));
    AFy=AFy+wB(i)*exp(-1j*(i-1)*2*pi*d*(sin(Th).*sin(Ph)-sin(th1).*sin(ph1)));
end
for i=1:N
    AFx=AFx+wB(i)*exp(-1j*(i-1)*2*pi*d*(sin(Th).*cos(Ph)-sin(th2).*cos(ph2)));
    AFy=AFy+wB(i)*exp(-1j*(i-1)*2*pi*d*(sin(Th).*sin(Ph)-sin(th2).*sin(ph2)));
end
AFn=AFx.*AFy/tot^2;
x=abs(AFn).*sin(Th).*cos(Ph);
y=abs(AFn).*sin(Th).*sin(Ph);
z=abs(AFn).*cos(Th);
figure;
mesh(x,y,z)
colormap([0 0 0])
axis square
axis equal
view(118,22)
xlabel('x')
ylabel('y')
zlabel('z')
zoom(1.5)
grid off
axis off

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -