How to calculate moving RMS of acceleration and time vectors

6 vues (au cours des 30 derniers jours)
Mehdi Ebadi
Mehdi Ebadi le 20 Sep 2020
I have time and accelearion vectors (attached excelsheet column A:time and column B: acceleration) and woud like to calculate the moving rms using the following equation. Please note that N is the number of acceleration data points from t-1 to t+1 s so basically the rms should start from t=1s.
N is the number of acceleration data points from t-1 to t+1 s.
.

Réponses (2)

David Hill
David Hill le 20 Sep 2020
a_rms=flip(sqrt(movsum(flip(a).^2)./(1:length(a))));

Rapf Schmidt
Rapf Schmidt le 25 Avr 2022
a_rms=sqrt(movmean(a.^2,N));

Community Treasure Hunt

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

Start Hunting!

Translated by