📄 meritfactor_comp.m
字号:
clear,close all;
p=1;
sqL=10;
L=128;
M=3;
s=deng_seq(L);
% nfft=2*L+1;
% x=zeros(M,201,nfft);
for m=1:M
[x,nfft]=autocorrelationwin(L,s(m,:),0);
xnew = x(1,:);
xnew((end+1)/2) = 0;
SL1 = sum(abs(xnew).^2);
PSL(m) = max(abs(xnew));
F(m) = 10*log10(1/SL1);
R(m) = 10*log10(1/PSL(m));
% end of merit factor calculations
% start of Doppler merit factor calculations
fdT_t=0;
j=1;
Ffd=F(m);
[r,c] = size(x);
while Ffd>3
fdT_t = fdT_t+0.01;
j = j+1;
% first find tha value of mainlobe
xnew = x(j,:);
ml = xnew((end+1)/2);
xnew((end+1)/2) = 0;
sl = sum(abs(xnew).^2);
Ffd = 10*log10(ml^2/sl);
end
fd_t(m) = fdT_t;
Am(m,:,:) = x;
end
%Mean_F=10*log10( sum(10.^(F/10))/M );
%Mean_R=10*log10( sum(10.^(R/10))/M );
Mean_F = sum(F)/M;
Mean_R = sum(R)/M;
Mean_fd_t = sum(fd_t)/M;
time=(-(nfft/2)):1:(nfft/2-1);
fdT=0.:.01:2.;
% box off;
figure;
Am=20*log10(abs(Am));
% subplot(2,2,1);
for n=1:201
A1(n,:)=Am(1,n,:);
end
pcolor (time,fdT,A1);
shading interp;
xlabel('sample shift');
ylabel('Doppler shift fd*T');
zlabel('Autocorrelation function');
caxis([-30 0]);
colorbar;
% subplot(2,2,2);
% for n=1:201
% A2(n,:)=Am(2,n,:);
% end
% image(time,fdT,A2,'CDataMapping','scaled');
%
% xlabel('sample shift');
% ylabel('Doppler shift fd*T');
% zlabel('Autocorrelation function');
% colorbar('YLim',[-40 0]);
% subplot(2,2,3);
% for n=1:201
% A3(n,:)=Am(3,n,:);
% end
% image(time,fdT,A3,'CDataMapping','scaled');
%
% xlabel('sample shift');
% ylabel('Doppler shift fd*T');
% zlabel('Autocorrelation function');
% colorbar('YLim',[-40 0]);
%
% subplot(2,2,4);
% for n=1:201
% A4(n,:)=Am(4,n,:);
% end
% image(time,fdT,A4,'CDataMapping','scaled');
%
% xlabel('sample shift');
% ylabel('Doppler shift fd*T');
% zlabel('Autocorrelation function');
% colorbar('YLim',[-40 0]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -