comparing two time series
이전 댓글 표시
Hello, I'm using Matlab to compare two time series for rainfall across a year using two different methods of measurement. So I have two sets of data of hourly data for a year, and I was wondering what the best way to statistically compare them to see if the peaks are the same and so on, to compare this new method of rainfall measurment.
Many thanks,
Olly
댓글 수: 3
Wayne King
2011년 11월 28일
Can you please describe a bit more about these two different measurement methods? It would help to have a bit more information before suggesting a way to compare the recordings. From your description, it is the same set of data measured two different ways and not in fact two different time series.
Hin Kwan Wong
2011년 11월 28일
I assume you do not know the true temperature? As Wayne suggested more info is welcome, such as which method is the more 'accurate' one.
Plot the two together on the same graph is the best you can do visually. If both method are good, scatter plot the two series should give you a nice highly correlated (approx. straight line) with positive slope
Numerically, off-diagonal elements of the normalized covariance matrix
cov(A/std(A),B/std(B)) will also give you an idea how 'close' the two measurements are. The closer the value to one, the more similar they are. The off diagonal element is basically the slope of the scatter plot mentioned earlier minus normalization factors.
Tom Hawkins
2018년 9월 7일
This suggestion using the covariance matrix is very useful, but what happens if std(A) or std(B) is zero? For example, if we compare two signals that are both constant, but one might have an offset relative to the other, say. Can we replace the calculation with something that doesn't return NaN and is comparable with the covariance calculation?
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!