fig10_02.m .txt
来自「最优阵列信号处理一书中的源代码」· 文本 代码 · 共 44 行
TXT
44 行
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Figure 10.2
% Spatial Spreading vs. Array Resolution
% K. Bell 1/17/08
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
N = 10;
n = (-(N-1)/2:(N-1)/2).';
u = [-1:0.001:1];
w = 1/N*[ones(N,1)];
d = 1/2;
vv = exp(j*pi*2*d*n*u);
B = 20*log10(abs(w'*vv));
figure
plot(u,B);
hold on
plot([-0.1 -0.1 0.1 0.1],[-20 0 0 -20],'--');
axis([-0.5 0.5 -20 5])
set(gca,'YTick',[-20 -15 -10 -5 0 5])
h=xlabel('u');
p=get(h,'Position');
set(h,'Position',[0.5 p(2:3)])
text(0,-21.7,'(a)','HorizontalAlignment','center')
hold off
figure
plot(u,B);
hold on
plot([-0.5 -0.5 0.5 0.5],[-25 0 0 -25],'--');
axis([-1 1 -25 5])
set(gca,'YTick',[-25 -20 -15 -10 -5 0 5])
h=xlabel('u');
p=get(h,'Position');
set(h,'Position',[1 p(2:3)])
text(0,-27,'(b)','HorizontalAlignment','center')
hold off
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?