Previous Up Next

5.27.5  Root mean square : rms

rms takes one argument, a list X of real or complex numbers x1,x2,…,xn. The function returns the root mean square of X which is defined by

RMS(X)=
n
k=1
|xk|2
n

For example, input :

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

Output :

sqrt(30)

Input :

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

Output :

3*sqrt(5)/2

Previous Up Next