# Movrms

Movrms-func

## Description

The function returns a vector to calculate the root mean square(rms) of adjacent ranges [i-nb, i+nf], for a point i

The root mean square of adjacent ranges at point i is given by

where is the backward offset and is the forward offset

## Syntax

vector Movrms(vector vx, int back[, int forward])

## Parameters

**vx**

- Input data vector used to calculate adjacent rms.

**back**

- Input integer for the offset backward with respect to current row number.

**forward**

- Input integer for the offset forward with respect to current row number. If
**forward** is omitted, it will be set to be equal to **back** internally

## Return

Return the adjacent RMS vector

**Notes:** The boundary will be treated with the way below

## Example

//Col(B) will be filled with rms at each point for data within the window [i-2, i+2]
//Col(C) will be filled with rms at each point for data within the window [i, i+2]
for(ii=1;ii<=30;ii++) col(A)[ii] = ii;
col(B)=movrms(col(1),2);
col(C)=movrms(col(1),0, 2);

## See Also

Rms, Movavg, Movslope