rms

Compute root mean square values.

Syntax

r=rms(x)

r=rms(x,dim)

Inputs

x
Data sample.
Type: double | integer | char | string | logical | struct | cell
Dimension: scalar | vector | matrix
dim
Dimension on which to perform the calculation.
Default: first non-singleton dimension.
Type: integer
Dimension: scalar

Outputs

r
RMS values.

Examples

Vector example:

x=[9.3, 10.6, 11.9, 13.3, 15.1, 18.2];
r=rms(x)
r = 13.395
Matrix example:
x=[9.3, 4.8; 10.6, 6.6; 11.9, 8.0; 13.s3, 9.3; 15.1, 10.6; 18.2, 11.9];
r=rms(x)
r = [Matrix] 1 x 2
13.39527   8.86059