Trouble understanding "Lags" for Cross Correlation

조회 수: 25 (최근 30일)
JM
JM 2019년 6월 25일
답변: Honglei Chen 2019년 6월 26일
I've read through the help page for cross correlations but I'm still having trouble understanding what lags actually represent.
The help page refers to them as "Lag indices, returned as a vector," but I'm having trouble understanding what they actually means in terms of my data.
Let's say I have two sets of data, each equals a 10 second trial of data and contain 1000 data points.
Does the lag represent a unit of time? e.g. 1 lag = 1 second? So if my correlation coefficient is highest at lag = 1, would it mean the relationship is strongest with a phase shift of 1 second?
Thank you.

채택된 답변

Honglei Chen
Honglei Chen 2019년 6월 26일
1 lag is essentially 1 sample, so how much time it represents depends on your sample rate. In your case, since for 10 sec data you have 1000 data points, it means that your sample rate is 100 Hz, so 1 lag represents 0.01 sec.
HTH

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by