?? complementarycode.m
字號:
function complementaryCode
% 互補(bǔ)碼的測試
% according to book <radar handbook>(skolnik),second edition. pp.399
% notes: must replace 0 with -1 in the serials!
% fuxiongjun @2006-4-20
% serials1=[1 1 1 0 0 1 1 1 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0 0 ];
clear;
serials1=[1 1 1 -1 -1 1 1 1 -1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 -1 -1 -1];
figure(1);
subplot(311);
plot(xcorr(serials1));
title('auto-correlation of serials 1');
% serials2=[0 0 0 1 1 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 0 ];
serials2=[-1 -1 -1 1 1 -1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 -1 -1 -1];
subplot(312);
plot(xcorr(serials2));
title('auto-correlation of serials 2');
serials_xcorr_all=xcorr(serials1)+xcorr(serials2);
subplot(313);
plot(serials_xcorr_all);
title('sum of auto-correlations of serials 1 & serials 2');
figure(2);
plot(xcorr(serials1,serials2)); % 兩序列具有一定的相關(guān)性
title('cross-correlation of serials 1 & serials 2');
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -