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

    %% _P_-values for Correlation
% Return _p_-values for the test of zero
% correlation by scale. Obtain the MODWT of the DM-USD and JY-USD exchange
% return data down to level six using the Daubechies wavelet with two
% degrees of freedom ('db2') wavelet. Compute the correlation by scale and
% return the _p_-values.

% Copyright 2015 The MathWorks, Inc.

load DM_USD;
load JY_USD;
wdm = modwt(DM_USD,'db2',6);
wjy = modwt(JY_USD,'db2',6);
[wcorr,wcorrci,pval] = modwtcorr(wdm,wjy,'db2');
format longe
pval
format
%%
% The first column contains the _p_-value and the second column contains 
% the adjusted _p_-value based on the false discovery rate.