hadxcorr.m
来自「很全的通讯理论书籍源码」· M 代码 · 共 26 行
M
26 行
%-------------------------------------------------------------
% Compute cross-correlation of two oversampled Walsh-Hadamard
% functions.
%-------------------------------------------------------------
%--- compute hadamard sequences of length 2^7 ---
H = hadamard(128);
h1 = H(63,:);
h2 = H(64,:);
%--- oversample by 4 ---
osh1 = ones(4,1)*h1;
osh1 = osh1(:);
osh2 = ones(4,1)*h2;
osh2 = osh2(:);
%--- compute cross-correlation ---
h12 = xcorr(osh1,osh2);
plot([-511:511],abs(h12)/512); grid on
axis([-500 500 0 1])
ylabel('Normalized Cross-correlation')
xlabel('Delay(samples)')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?