# MovCoef

MovCoef-func

## Description

This function takes two vectors and returns a vector of moving correlation coefficientsof adjacent ranges [i-*back*, *i+forward*], for a point i. The part of range beyond the input vector is dropped.

within the window [i-*back*, *i+forward*]

## Syntax

Movcoef(v1,v2,back,forward)

## Parameters

**v1**

- A data vector

**v2**

- A second data vector

**back**

- Backward window. At any given
*i*, backward window is defined by *i* - back.

**forward**

- Forward window. At any given
*i*, forward window is defined by *i* + forward.

## Return

Return the moving correlation vector.

## Example

MovCoef(col(2), col(3), 20, 0);