📄 autocorrelation_pic.asv
字号:
function autocorrelation_pic(L,S)
m=power_integer_2(L);
nfft=2^(m);
% sfft=fft(S,nfft);
% Ac=fftshift(abs(ifft(sfft.* conj(sfft)))/L);
% figure(1);
% time=(-(nfft/2)):1:(nfft/2-1);
% plot(time,Ac);
S=[S, zeros(1,(nfft-L))];
x=zeros(41,nfft);
col=0;
for fdT=-2:.1:2
col=col+1;
for row=1:nfft
Sr(row)=S(row)*exp(i*2.*pi*(row-1)*fdT/L);
end
x(col,:) = fftshift(abs(ifft(fft(Sr).* conj(fft(S))))/L);
end
%
% test if the autocorrelation figure in the fdT=0 right matched the former Ac computered
% figure(1);
% time=(-(nfft/2)):1:(nfft/2-1);
% plot(time,Ac);
% hold all
% plot(time,x(:,21),'--r');
time=(-(nfft/2)):1:(nfft/2-1);
fdT=-2:.1:2;
figure(1);
mesh(time,fdT,x);
xlabel('sample shift');
ylabel('Doppler shift fd*T');
zlabel('Autocorrelation function');
figure(2);
contour(time,fdT,x);
xlabel('sample shift');
ylabel('Doppler shift fd*T');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -