📄 correstimate.m
字号:
function r=correstimate(x,y)
%CORRESTIMATE(x,y) estimate the inter correlation of signal x and y;
%Use the following function estimation method:
% 1 N-m-1
% R(m)=- {<{ x(n)y'(n+m)
% N n=0
if(length(x)~=length(y))
error('The input vector x and y must have the same length');
end
N=length(x);
r=zeros(1,N);
temp=0;
for m=0:N-1
for n=0:(N-m-1)
temp=temp+x(n+1)*conj(y(n+m+1));
end
r(m+1)=temp/N;
temp=0;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -