How to estimate the auto-correlation function value r(k)=E[X(n)X(n-k)]

4 ビュー (過去 30 日間)
Jiazeng Shan
Jiazeng Shan 2011 年 7 月 12 日
If X(n) is an available time series, I want to estimate the auto-correlation function value of r(k). The definition of r(k) is r(k)=E[X(n)X(n-k)]. Should I use the command "xcorr(x)"? But I will obtain a sequence, how could I get a value? Is this way right? I define y(n)=x(n-k), and use the xcorr(x,y)? But still I need a value and how to do the time delay process y(n)=x(n-k)?

採用された回答

Nirmal Gunaseelan
Nirmal Gunaseelan 2011 年 7 月 12 日
XCORR will return the autocorrelation values and the associated lags at which these values were calculated. The examples section has one:
ww = randn(1000,1);
[c_ww,lags] = xcorr(ww,10,'coeff');
stem(lags,c_ww)
What do you mean by just one value representing ACF? The sequence of values represent correlation between values at different lag indices (time) and a single value does not make sense.
  4 件のコメント
Jiazeng Shan
Jiazeng Shan 2011 年 7 月 12 日
Yes, that is what I need. I want the ACF value when lag are 0, 1 and so on. If the definition r(1)=E[X(n)X(n-1)],should I use xcorr(ww,10,'biased') instead of xcorr(ww,10,'coeff')? How to determine the options? Thanks.
Nirmal Gunaseelan
Nirmal Gunaseelan 2011 年 7 月 15 日
Option depends on what you want - the document clearly gives the various options and default (none) should work for most cases.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by