File Exchange

image thumbnail

Comparing Time Series using Semblance Analysis

version 1.0 (2 KB) by

This program shows the correlation between two datasets as a function of both time and wavelength.

29 Downloads

Updated

View License

Only in very simple situations can we describe the correlation between two time series as a single number. Often it varies both as a function of time, and of wavelength. Datasets may be uncorrelated on short timescales due to noise, but strongly correlated on larger wavelengths (eg annual).

This program will compute (using wavelets) the correlation as a function of both time and wavelength. Anticorrelation (s=-1) is displayed in blue, zero correlation (s=0) in green, and positive correlation (s=+1) in red.

The image shows the correlation between the oil price and the gold price, which is mostly red (implying strong positive correlation) except for a period between 1985 and 1995.

Note that it is valid to compare datasets that have been measured in different units using this method.

Comments and Ratings (5)

Fiona MacGill

Like the quick visual results
Thanks

James

James (view profile)

Bryan

Bryan (view profile)

A very nice method for comparison. In your Computers & Geosciences paper from 2008 you included dot product plots for some of the time series but the code for these plots is not included above. Could you give any pointers on implementing this code?

Thanks.

Robert

Robert (view profile)

Olivier B.

Clever method. Hope to see future enhancements.

MATLAB Release
MATLAB 7.4 (R2007a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video