필터 지우기
필터 지우기

Incrementing For Loop to do an Autocorrelation in Signal Processing

조회 수: 1 (최근 30일)
Fereizqo Sulaiman
Fereizqo Sulaiman 2018년 3월 15일
편집: Fereizqo Sulaiman 2018년 3월 15일
I want to make an increment for loop to do an autocorrelation in a signal processing, but i've got an error. Can anyone help me? Thanks, and this is my code :
Fs = 1600 ;
t = (0:1/Fs:1-1/Fs) ;
L = length (t) ;
f1 = 100 ;
A = 0.8 ;
y = A*sin(2*pi*f1*t);
[q,w] =size(x);
row = [];
for i = 1:w;
row(i) = y(1,(i+1):1:2)
[cr1(i),lgs1(i)] = xcorr(row(i),'coeff');
if cr1(i) < 0.8
row(i) = medfilt2 (row(i),20)
end
end
disp(row(i))
figure();
plot (lgs/Fs,cr);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by