i want to calculate correlation every half cycle i have 2400 sample per cycle
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
i want to calculate correlation index every half cycle i have 2400 sample per cycle
Antworten (1)
Ayush Modi
am 10 Okt. 2023
Bearbeitet: Ayush Modi
am 10 Okt. 2023
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!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!