Root mean square

### 19.2.1 Root mean square

The rms command finds the room mean square of a list of numbers X=[x1,x2,…,xn], which is defined by

RMS(X)= |
√
n
∑
k=1
| |xk|2
n
| .

- rms takes X, a list of real or complex numbers [x1,x2,…,xn] or an audio clip. In the latter case, sample values are mapped to the segment [−1,1] on each individual channel.
- rms(X) returns the root mean square of X.

#### Examples

rms([1,2,5,8,3,6,7,9,-1])

| √ |
30

rms([1,1-i,2+3i,5-2i])

3
2
| √ |
5