Cross-covariance

`c = xcov(x,y)`

`c = xcov(x)`

`c = xcov(___,maxlag)`

`c = xcov(___,scaleopt)`

```
[c,lags]
= xcov(___)
```

returns the cross-covariance of two
discrete-time sequences. Cross-covariance measures the similarity between a vector
`c`

= xcov(`x`

,`y`

)`x`

and shifted (lagged) copies of a vector `y`

as
a function of the lag. If `x`

and `y`

have different
lengths, the function appends zeros to the end of the shorter vector so it has the same
length as the other.

returns the
autocovariance sequence of
`c`

= xcov(`x`

)`x`

. If `x`

is a matrix, then `c`

is a matrix whose columns contain the autocovariance and cross-covariance sequences for
all combinations of the columns of `x`

.

[1] Orfanidis, Sophocles J.
*Optimum Signal Processing: An Introduction*. 2nd Edition. New York:
McGraw-Hill, 1996.

[2] Larsen, Jan. “Correlation Functions and Power Spectra.” November, 2009. http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/4932/pdf/imm4932.pdf