⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 complementarycode.m

📁 实现了P4多相码的产生和脉压
💻 M
字号:
function complementaryCode
% 互补码的测试
% 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));  % 两序列具有一定的相关性
title('cross-correlation  of serials 1 & serials 2');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -