The root mean square is calculated using a moving window. It is calculated for each window of data according to the equation:
RMS - Root Mean Square
S - Window Length (Points)
f(s) - Data within the Window
According to the equation, the root mean square calculation consists of three steps:
1. Square all of the values in the window
2. Determine the mean of the resultant values
3. Take the square root of the result
In the script, this calculation is performed by iterating through the data with windows, and using the built in .rms() function on each window.
More: