Discrete-time cross-correlogram

版本 1.2.0.0 (2.0 KB) 作者: Alex Wiltschko
Cures cross-correlograms and headaches!* *note: does not actually cure headaches.
1.5K 次下载
更新时间 2010/9/20

查看许可证

Computes cross- or auto-correlograms between two discrete time series, supplied as a list of timestamps.

[tsOffsets, ts1idx, ts2idx] = crosscorrelogram(ts1, ts2, window)

INPUTS:
ts1 - a list of timestamps (in seconds) to use as the reference of the cross-correlogram
ts2 - timestamps (in seconds) used to create the cross-correlogram, compared against ts1
window - a length-2 vector specifying the width of the correlogram to compute, in seconds.

OUTPUTS:
tsOffsets - a list of offsets from timestamps in ts2 to their nearest timestamp in ts1.
ts1idx - an index for each offset in tsOffsets into ts1.
ts2idx - an index for each offset in tsOffsets into ts2.

USAGE:
% Create a dummy time series where one leads the other by 0.3 seconds
ts1 = sort(rand(1000,1)*1000);
ts2 = ts1 + 0.3;

% Calculate the cross-correlogram between the two signals with a 0.5 second window, starting at each spike time in ts1
offsets = crosscorrelogram(ts1, ts2, [0 0.5]);
hist(offsets, 100);

引用格式

Alex Wiltschko (2024). Discrete-time cross-correlogram (https://www.mathworks.com/matlabcentral/fileexchange/28566-discrete-time-cross-correlogram), MATLAB Central File Exchange. 检索时间: .

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

启发作品: rookpoly(Pcoef)

Community Treasure Hunt

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

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

corrected grammar in snarky summary description

1.1.0.0

Removed extraneous variables (more cleanup will occur in the future)

1.0.0.0