Autocovariance

版本 1.0.0.0 (1.6 KB) 作者: Jacques Burrus
Computes the autocovariance of two columns vectors consistently with the var and cov functions.
1.0K 次下载
更新时间 2012/3/29

查看许可证

autocov computes the autocovariance between two column vectors X and Y with same length N using the Fast Fourier Transform algorithm from 0 to N-2.

The resulting autocovariance column vector acv is given by the formula:

acv(p,1) = 1/(N-p) * \sum_{i=1}^{N}(X_{i} - X_bar) * (Y_{i+p} - Y_bar)

where X_bar and Y_bar are the mean estimates:

X_bar = 1/N * \sum_{i=1}^{N} X_{i}; Y_bar = 1/N * \sum_{i=1}^{N} Y_{i}

It satisfies the following identities:
1. variance consistency: if acv = autocov(X,X), then acv(1,1) = var(X)
2. covariance consistence: if acv = autocov(X,Y), then acv(1,1) = cov(X,Y)

引用格式

Jacques Burrus (2024). Autocovariance (https://www.mathworks.com/matlabcentral/fileexchange/35915-autocovariance), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
致谢

参考作品: autocov.m

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0