归一化横坐标后,图却只显示一半,求大虾指教!~
代码和图如下:
clc;
clear all;
theta=(0:0.5:360);%-90到90,隔0.1取
u=sin(theta*pi/180); %弧度正弦
%u=sind(theta); %角度正弦
delta=0.5; %阵元间最小间距
AF=0;
L=993; %阵列的最大长度等于L*delta,delta为最小间距
AF=sum(exp(1i*2*pi*[2,28,36,48,90,116,134,158,172,196,215,228,245,278,296,330,350,428,498,519,530,548,600,641,686,716,833,873,894,905,923,965].'*sind(theta)),1);
AF = abs(AF);%绝对值
AF=20*log10(AF/max(AF));
plot(u,AF);
title('Isophoric linear-array power pattern. number of elements = 32','FontSize', 10);
xlabel('{u}','FontSize', 10);
ylabel('{K=32 FF*(u) dB}','FontSize', 10);
axis([0 2 -30 0]);
%后面的程序是求阵列因子AF的峰值旁瓣电平PSL(通常就是要最小化该参数)、平均旁瓣电平ASL、主波束宽度等指标
flag=1;
%寻找峰值旁瓣电平(PSL)和平均旁瓣电平(ASL)
for i=(length(AF)-1)/2+2:length(AF)-1
if AF(i)>AF(i-1) && AF(i)>AF(i+1)
SL(flag)=AF(i);
flag=flag+1;
end
end
PSL=max(SL);
ASL=mean(SL);
%寻找-3dB波束宽度
for i=(length(AF)-1)/2+1:length(AF)
if AF((length(AF)-1)/2+1)-AF(i)>=3
flag2=i;
break;
end
end
HPBW=2*asin((u(flag2)-u((length(AF)-1)/2+1))); %弧度表示
untitled.jpg
(32.94 KB, 下载次数: 0)
2013-9-12 21:38 上传