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

📄 fig4_28.m

📁 《最优阵列处理》一书第四章的MATLAB例程
💻 M
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Fig 4.28% Sampling on 2-dimension T-C, using ifft to get weight% and get the reconstructed beampattern using fft % Xiaomin Lu 11-2-98	% updated by K. Bell 9/29/00
% Updated by Lillian Xiaolan Xu 02/12/2001, K. Bell 7/23/01, 9/30/01
% Function called: cheby%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*****************************%clear allclose allN = 10;M = 10;dx = 0.5;dy = 0.5;dB = 20;R = 10^(dB/20);x0 = cosh(1/(N-1)*acosh(R));[ux,uy] = meshgrid(-1:1/40:1);for k1 = 0:N-1    for k2 = 0:N-1        Bpsi(k1+1,k2+1) = cheby(N-1,x0*cos((k1-(N-1)/2)*pi/N)*cos((k2-(M-1)/2)*pi/M));    endendfor k1 = 0:N-1    for k2 = 0:N-1        t1 = k1-(N-1)/2;        t2 = k2-(M-1)/2;        B(k1+1,k2+1) = exp(-j*(N-1)/2*(t1*2*pi/N)-j*(M-1)/2*(t2*2*pi/M))*Bpsi(k1+1,k2+1)';    endendw = ifft2(B);w = real(w)-j*imag(w);for n = 0:N-1    for m = 0:N-1        w(n+1,m+1) = w(n+1,m+1)*exp(j*pi/N*(N-1)*(n+m));    endend w = abs(w)/max(max(abs(w)));w(N/2+1:N,M/2+1:M)Beam = 0;for n = 0:N-1    for m = 0:N-1        Beam = Beam + w(n+1,m+1)*exp(j*n*2*pi*dx*ux+j*m*2*pi*dy*uy);    endendBeam = Beam.*exp(-j*(N-1)/2*pi*ux-j*(N-1)/2*pi*uy);Beam = 20*log10(abs(Beam)/max(max(abs(Beam))));for k1 = 1:size(Beam,1)    for k2 = 1:size(Beam,2)        if (Beam(k1,k2)<-60) Beam(k1,k2)=-60; end    endendmesh(ux,uy,Beam)axis([-1 1 -1 1 -60 0])xlabel('\it u_x','Fontsize',14);ylabel('\it u_y','Fontsize',14);zlabel('Beam pattern (dB)','Fontsize',14);%title('Regenerated D-C pattern, using IFFT, N=M=10, SLL=-20dB dx=dy=\lambda/2') figureu = -1:1/100:1;t = 1;for phi = [0 30 60 90]    ux = u*cos(phi/180*pi);    uy = u*sin(phi/180*pi);        Beam = 0;    for n = 0:N-1        for m = 0:N-1            Beam = Beam + w(n+1,m+1)*exp(j*n*pi*ux+j*m*pi*uy);        end    end    Beam = Beam.*exp(-j*(N-1)/2*pi*ux-j*(N-1)/2*pi*uy);    table(t,:) = 20*log10(abs(Beam)/max(abs(Beam)));        t = t+1;endsubplot(2,2,1)plot(u,table(1,:))gridaxis([-1 1 -60 10])xlabel('\it u_r','Fontsize',14);ylabel('Beam pattern (dB)','Fontsize',14);text(-0.9,4,'\phi = 0^o','Fontsize',12)%text(-1,18,'                          Pattern cuts at several phis')subplot(2,2,2)plot(u,table(2,:))gridaxis([-1 1 -60 10])xlabel('\it u_r','Fontsize',14);ylabel('Beam pattern (dB)','Fontsize',14);text(-0.9,4,'\phi = 30^o','Fontsize',12)subplot(2,2,3)plot(u,table(3,:))gridaxis([-1 1 -60 10])xlabel('\it u_r','Fontsize',14);ylabel('Beam pattern (dB)','Fontsize',14);text(-0.9,4,'\phi = 60^o','Fontsize',12)subplot(2,2,4)plot(u,table(4,:))gridaxis([-1 1 -60 10])xlabel('\it u_r','Fontsize',14);ylabel('Beam pattern (dB)','Fontsize',14);text(-0.9,4,'\phi = 90^o','Fontsize',12)         

⌨️ 快捷键说明

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