Root mean square

### 21.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
| .

(See Section 28.2.16 for other uses of rms.)

- rms takes X, a list of real or complex numbers [x1,x2,…,xn].
- rms(X) returns RMS(X) as defined above.

#### Examples

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

| √ |
30

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

3
2
| √ |
5