필터 지우기
필터 지우기

i want to calculate correlation every half cycle i have 2400 sample per cycle

조회 수: 1 (최근 30일)
mohamed
mohamed 2023년 10월 6일
편집: Ayush Modi 2023년 10월 10일
i want to calculate correlation index every half cycle i have 2400 sample per cycle

답변 (1개)

Ayush Modi
Ayush Modi 2023년 10월 10일
편집: Ayush Modi 2023년 10월 10일
Hi,
I understand you would line to calculate correlation once every half cycle.
Here is an example showing how you can implement the same.
halfCycleLength = cycleLength / 2; % Number of samples per half cycle
correlations = []; % Array to store the correlation values
for i = 1:halfCycleLength:length(signal) - halfCycleLength
% Extract the current half cycle
halfCycle = signal(i:i+halfCycleLength-1);
% Compute the autocorrelation of the half cycle
correlation = xcorr(halfCycle);
% Store the correlation value
correlations = [correlations, correlation];
end
Hope this helps!
NOTE: As suggested in the comments, please read this guide about how to ask a good question.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by