How to calculate moving RMS of acceleration and time vectors

5 次查看(过去 30 天)
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.
.

回答(2 个)

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

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

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by