필터 지우기
필터 지우기

Can anyone provide a code for calculating autocorrelation without autocorr?

조회 수: 23 (최근 30일)
Can anyone provide a code for calculating autocorrelation without using autocorr as I do not have the econometrics toolbox?

답변 (3개)

Walter Roberson
Walter Roberson 2015년 10월 26일

Abdul Wasay
Abdul Wasay 2020년 2월 16일
x=input('Enter the first Sequence : ');
h=input('Enter the second sequence : ');
n=length(x);
m=length(h);
k=n+m-1;
x=[x zeros(1,k-n)]';
h=wrev(h);
h=[h zeros(1,k-m)]';
for i=1:k
c(:,i)=circshift(x,i-1);
end
y=c*h;
disp('Correlation of the sequences')
disp(y');

i Wijayanto
i Wijayanto 2020년 9월 29일

카테고리

Help CenterFile Exchange에서 Whos에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by