Autocorrelogram - Utilizing xcorr() for spike train analysis

9 次查看(过去 30 天)
I'm wondering if someone could help clear up some confusion I am having surrounding the xcorr() function since I am struggling to parse how it works exactly. First off, I am trying to make an autocorrelogram out of spike train data. Thus, I am inputting timestamps into xcorr() like so... xcorr(spiketimes). When I run that line of code, I find that there's a peak towards the length of the timestamps vector. This doesn't make sense. The peak should be at lag zero (where the vector is 100% correlated with itself). What am I doing wrong here? Or is my understanding of an autocorrelogram incorrect? Also, I'm not totally sure how to adjust bin width. If anyone has some pointers, I'd appreciate it. Finally, the fact that I can't center the plot that's created from xcorr() at zero is driving me crazy. How can I fix this?

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by