You are on page 1of 7

Crosswavelet and Wavelet Coherence hariprasadh.

This example illustrates how simple it is to do continuous wavelet transform (CWT), Cross wavelet
transform (XWT) and Wavelet Coherence (WTC) plots of your own data.

Home The time series we will be analyzing are the winter Arctic Oscillation index (AO) and the maximum
Theory sea ice extent in the Baltic (BMI).
Example
Applications
FAQ
Download Load the data
Tips Change the pdf.
Links Continuous wavelet transform (CWT)
Cross wavelet transform (XWT)
Wavelet coherence (WTC)
Copyright notice

First we load the two time series into the matrices d1 and d2.

seriesname={'AO' 'BMI'};
d1=load('jao.txt');
d2=load('jbaltic.txt');

1 of 7 3/9/2010 10:22 PM
Crosswavelet and Wavelet Coherence hariprasadh.s

The time series of Baltic Sea ice extent is highly bi-modal and we therefore transform the
timeseries into a series of percentiles. The transformed series probably reacts 'more linearly' to
climate.

d2(:,2)=boxpdf(d2(:,2));

The CWT expands the time series into time frequency space.

tlim=[min(d1(1,1),d2(1,1)) max(d1(end,1),d2(end,1))];
subplot(2,1,1);
wt(d1);
title(seriesname{1});
set(gca,'xlim',tlim);
subplot(2,1,2)
wt(d2)
title(seriesname{2})
set(gca,'xlim',tlim)

2 of 7 3/9/2010 10:22 PM
Crosswavelet and Wavelet Coherence hariprasadh.s

The XWT finds regions in time frequency space where the time series show high common power.

clf

3 of 7 3/9/2010 10:22 PM
Crosswavelet and Wavelet Coherence hariprasadh.s

xwt(d1,d2)
title(['XWT: ' seriesname{1} '-' seriesname{2} ] )

4 of 7 3/9/2010 10:22 PM
Crosswavelet and Wavelet Coherence hariprasadh.s

The WTC finds regions in time frequency space where the two time series co-vary (but does not
necessarily have high power).

clf
wtc(d1,d2)
title(['WTC: ' seriesname{1} '-' seriesname{2} ] )

5 of 7 3/9/2010 10:22 PM
Crosswavelet and Wavelet Coherence hariprasadh.s

Copyright (C) 2002-2004, Aslak Grinsted

This software may be used, copied, or redistributed as long as it is not

6 of 7 3/9/2010 10:22 PM
Crosswavelet and Wavelet Coherence hariprasadh.s

sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever.

Published with MATLAB® 7.0

Aslak Grinsted John C. Moore Svetlana Jevrejeva

7 of 7 3/9/2010 10:22 PM

You might also like