Correlate two data sets

조회 수: 13 (최근 30일)
J Singh
J Singh 2018년 7월 31일
편집: jonas 2018년 7월 31일
I've two sets of data, which I would like to correlate. The number of elements in both the data sets are different and have different respective dates. What would be the best way to do this?
  댓글 수: 2
KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 7월 31일
You can try to by considering all dates, in both data sets by color variation in the value of both datasets
J Singh
J Singh 2018년 7월 31일
I've a lot of different data sets and wanted to get a coefficient of correlation between each set. The above is just an example of the issue that I am facing.

댓글을 달려면 로그인하십시오.

답변 (1개)

jonas
jonas 2018년 7월 31일
Obviously there is a linear increase over time in the longer vector. You can simply interpolate the values in the longer vector to match the exact dates of the shorter vector and then check the correlation by corr.
  댓글 수: 2
J Singh
J Singh 2018년 7월 31일
The actual data (which is a lot larger) is not very linear. Is there any other way you can propose.
jonas
jonas 2018년 7월 31일
편집: jonas 2018년 7월 31일
From what I know, correlation is calculated pair-wise, so without somehow pairing the samples I don't know how you can calculate a correlation coefficient.
You may be interested in cross-correlation though ( link )

댓글을 달려면 로그인하십시오.

카테고리

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