?? correlation.m
字號:
function corr = correlation(a,b)
% CORRELATION Calculate the correlation of binary sequences
%
% Corr = CORRELATION(A,B) computes the correlation of binary sequences
% A and B. The results is stored in a row vector Corr. Each element in
% Corr is the correlation of A and a right-shift version of B
%
% If A = B, Cor is the autocorrelation of A.
%
for i = 0:length(a)-1
corr(i+1) = sum(a.*circshift(b,[0 i]));
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -