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

📄 sa_fig4_19.m

📁 这个是英文版<<Smart Antennas for Wireless Communications>>配套的matlab源程序
💻 M
字号:
%Smart antennas figure 4.19 kaiser-bessel weights on a linear arra
d=.5;
N=input('what is the number of elements?');
theta=-pi/2:.01:pi/2;
ang=theta*180/pi;
test=kaiser(N,3);
check=mod(N,2)
if check == 0
wB=flipud(test(1:N/2));
wB=wB/max(wB);
figure;
stem(test/max(test),'k')
xlabel('Element Number')
ylabel('Array Weights')
axis([1 N 0 1.1])
AF=[zeros(1,length(theta))];
tot=sum(wB);
for i=1:N/2
    AF=AF+wB(i)*cos((2*i-1)*pi*d*(sin(theta)));
end
else
    wB=flipud(test(1:(N-1)/2+1));
wB=wB/max(wB);
figure;
stem(test/max(test),'k')
xlabel('Element Number')
ylabel('Array Weights')
axis([1 N 0 1.1])
AF=[zeros(1,length(theta))];
tot=sum(wB);
for i=1:(N-1)/2+1
    AF=AF+wB(i)*cos(2*(i-1)*pi*d*sin(theta));
end
end
AFn=sin(N*pi*d*sin(theta))./(N*pi*d*sin(theta));
figure;plot(ang,abs(AF)/tot,'k', ang,abs(AFn),'k:')
axis([-90 90 0 1.1])
 set(gca,'xTick',[-90:30:90])
xlabel('\theta')
ylabel('|AF|')
grid on

⌨️ 快捷键说明

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