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

📄 fig4_54_55_56.m

📁 《最优阵列处理》一书第四章的MATLAB例程
💻 M
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Figures 4.54, 4.55, 4.56
% Beampattern of 91-element uniform hexagonal array
% Xiaomin Lu 11-2-98
% Updated by K. Bell 10/11/00
% Lillian Xu updated 12/06/2000
% Updated by Lillian Xiaolan Xu 02/12/2001, K. Bell 7/23/01, 9/30/01
% Updated by K. Bell 1/17/08
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Beampattern for 91-element array, uniform weight

clear all
close all

Nx = 11;

[ux,uy] = meshgrid(-1:1/50:1);

Beam = 0;
for m = -(Nx-1)/2:(Nx-1)/2
    for n = -(Nx-1-abs(m))/2:(Nx-1-abs(m))/2
        Beam = Beam+exp(j*pi*n*ux+j*pi*m*sqrt(3)/2*uy);
    end
end
Beam = abs(Beam)/max(max(abs(Beam)));
Beam = 20*log10(Beam);
for k1 = 1:size(Beam,1)
    for k2 = 1:size(Beam,2)
        if(Beam(k1,k2)<-80) Beam(k1,k2)=-80; end
    end
end

mesh(ux,uy,Beam);
grid on
axis([-1 1 -1 1 -80 0])
xlabel('\it u_x','Fontsize',14);
ylabel('\it u_y','Fontsize',14);
zlabel('Beam pattern (dB)','Fontsize',14)
%title('Response of 91-element uniform Hexagonal array')
figure

cs = contour(ux,uy,Beam);
axis square
xlabel('\it u_x','Fontsize',14);
ylabel('\it u_y','Fontsize',14);
%title('Contour plot of 91-element Hex Array, uniform weighting') 


u = -1:1/100:1;
k = 1;
for phi = [0 10 20 30]
    ux = u*cos(phi/180*pi);
    uy = u*sin(phi/180*pi);
    Beam = 0;
    for m = -(Nx-1)/2:(Nx-1)/2
        for n = -(Nx-1-abs(m))/2:(Nx-1-abs(m))/2
            Beam = Beam+exp(j*pi*n*ux+j*pi*m*sqrt(3)/2*uy);
        end
    end
    Beam = 20*log10(abs(Beam)/max(abs(Beam)));
    table(k,:) = Beam;
    k = k+1;
end
figure
subplot(2,2,1)
plot(u,table(1,:));
grid
axis([-1 1 -60 0])
xlabel('\it u_r','Fontsize',14);
ylabel('Beam pattern (dB)','Fontsize',14);
title('\phi=0^o','Fontsize',14)
%text(-0.07,-72.5,'(a)')

subplot(2,2,2)
plot(u,table(2,:));
grid
axis([-1 1 -60 0])
xlabel('\it u_r','Fontsize',14);
ylabel('Beam pattern (dB)','Fontsize',14);
title('\phi=10^o','Fontsize',14)

subplot(2,2,3)
plot(u,table(3,:));
grid
axis([-1 1 -60 0])
xlabel('\it u_r','Fontsize',14);
ylabel('Beam pattern (dB)','Fontsize',14);
title('\phi=20^o','Fontsize',14)
subplot(2,2,4)
plot(u,table(4,:));
grid
axis([-1 1 -60 0])
xlabel('\it u_r','Fontsize',14);
ylabel('Beam pattern (dB)','Fontsize',14);
title('\phi=30^o','Fontsize',14)



⌨️ 快捷键说明

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