フィルターのクリア

Autocorrelations and Correlogram

32 ビュー (過去 30 日間)
Linford Briant
Linford Briant 2012 年 3 月 16 日
Hi MATLAB Central,
I am having trouble finding a function which computes and displays a correlogram for the autocorrelation of my spike-train data. From the functions I have found and applied, I feel like my understanding of the Autocorrelation may have some holes in it.
Suppose I have a vector, v, which displays the tonic firing of a neurone. An example of such a trace can be seen here (top trace):
Now I would expect the autocorrelation and correlogram for my vector to give obvious peaks of correlation; a peak at 0 lag, and peaks at every integer multiple of the (constant) inter-spike-interval.
The trouble is, the MATLAB functions do not give this relationship; they give a pyramid shape function. Moreover, the y-axis doesn't occur on a scale between -1 and 1, which I would expect if it was displaying the correlation. Rather it has a max value of 15e08!!
Which autocorrelation function would give me the expected relationship/how am I miss-using these autocorrelation functions?
Thanks,
Linford

採用された回答

Wayne King
Wayne King 2012 年 3 月 16 日
Hi Linford, If you use xcorr() with the 'coeff' option you get the normalized autocorrelation sequence which does not exceed 1 in absolute value.
The triangle shape that you speak about is expected. The sample autocorrelation sequence by necessity uses fewer and fewer samples at larger lags (the summation cannot exceed the length of the input vector), so you do expect the sample ACF to decay.
Here is an example with a sinusoid. I'll use a 100 Hz sine wave sample at 1 kHz.
t = 0:0.001:1-0.001;
x = cos(2*pi*100*t);
[xc,lags] = xcorr(x,'coeff');
stem(lags,xc)
Now let's zoom in a bit.
stem(lags(length(x):length(x)+50),xc(length(x):length(x)+50));
xlabel('Lags'); ylabel('ACF');
Now you see that the ACF is oscillating with a period of 10 lags, which is exactly what you expect since the sampling interval is 1 msec and the period is 10 msec.
  3 件のコメント
Linford Briant
Linford Briant 2012 年 3 月 16 日
So Wayne, obviously this sampling rate is a problem, because the time step in my data is 0.025millisecs. How can I account for this? Should I convert the data into a series of delta-functions when a spike occuts, and in this data use a larer time-step?
Thanks,
L
Wayne King
Wayne King 2012 年 3 月 16 日
Hi Linford, I'm not sure I understand why a 0.025 time interval is a problem. That just means that your lags are in intervals of 0.025 seconds.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeParametric Spectral Estimation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by