www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/DMUSDExchangeRatesByScaleExample.m

    %% Correlation by Scale
% Find the correlation by scale for monthly DM-USD exhange rate returns 
% from 1970 to 1998. The return data are log transformed. Use the 
% Daubechies wavelet with two vanishing moments ('db2') to obtain the
% MODWT down to level 6. Then, obtain the correlation data.

% Copyright 2015 The MathWorks, Inc.

load DM_USD;
load JY_USD;
wdm = modwt(DM_USD,'db2',6);
wjy = modwt(JY_USD,'db2',6);
wcorr = modwtcorr(wdm,wjy,'db2')
%%
% |wcorr| contains seven elements. The first six elements are the
% correlation coefficients for the wavelet (detail) levels one to six. The
% final element is the correlation for the scaling (lowpass) level six.