# cumcorr {#cumcorr}

## Syntax {#syntax}

`cumcorr(X,Y)`

Please see [Cumulative Window Functions](../Themes/cumFunctions.md) for the parameter description and windowing logic.

## Details {#details}

Cumulatively calculate the correlation of *X* and *Y*. The result is a vector of the same length as *X*.

## Examples {#examples}

```
x = 7 4 5 8 9
y = 1 7 8 9 0
cumcorr(x, y);
// output: [,-1,-0.893405,-0.1524,-0.518751]
```

