www.pudn.com > DBF_oneANDtwo.zip > dbf_gui.m, change:2015-06-14,size:1494b


close all; 
clear all; 
set(0,'DefaultAxesColorOrder',[0 0 0],'DefaultAxesLineStyleOrder','-|-.|--|:'); 
set(gcf,'Name','一维DBF方向图'); 
%% 一维DBF,阵元数量的影响 
[deg,result]=dbf(4,4,0);%M=4,N=4,\eta=1 
p=plot(deg,result); 
set(p,'Color','blue','LineWidth',2); 
xlabel('目标方向(度)'); 
ylabel('归一化功率(dB)'); 
hold all; 
 
 
[deg,result]=dbf(4,8,0); 
p=plot(deg,result); 
set(p,'Color','Green','LineWidth',2); 
hold all; 
 
[deg,result]=dbf(8,8,0); 
p=plot(deg,result); 
set(p,'Color','red','LineWidth',2); 
legend('M=4,N=4','M=4,N=8','M=8,N=8'); 
 
%% 一维DBF,阵元是否稀疏的影响 
figure; 
set(gcf,'Name','一维DBF方向图'); 
set(0,'DefaultAxesColorOrder',[0 0,0],'DefaultAxesLineStyleOrder','--|-|:'); 
[deg,result]=dbf(8,8,0); 
p=plot(deg,result);set(p,'Color','Blue','LineWidth',2); 
xlabel('目标方向(度)'); 
ylabel('归一化功率(dB)'); 
hold all; 
 
[deg,result]=dbf(8,8,1); 
p=plot(deg,result); 
set(p,'Color','red','LineWidth',2); 
legend('\eta=1','\eta=N'); 
 
%% 二维DBF 
 
[deg,result]=dbf2(8,8,0);%二维DBF,M=8,N=8,\eta=1 
[M,N]=size(result); 
 
%%切割掉3D图像底部 
for m=1:M 
    for n=1:N 
        if(result(m,n)<-20)  
            result(m,n)=-20; 
        end 
    end 
end 
 
figure; 
set(gcf,'Name','二维DBF方向图'); 
[x,y]=meshgrid(deg,deg); 
mesh(x,y,real(result)); 
xlabel('发射角(度)'); 
ylabel('接收角(度)'); 
%axis([-60 60 -60 60 -80 0]); 
figure; 
set(gcf,'Name','二维DBF方向图等高线'); 
contour(deg,deg,real(result)); 
xlabel('发射角(度)'); 
ylabel('接收角(度)');