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

    %% Wavelet Confidence Intervals
% Show how different confidence level values affect the width of the 
% confidence intervals. An increased confidence level value increases the 
% confidence interval width.
%%
% Obtain the MODWT of the Southern Oscillation Index data using the 
% Fejer-Korovkin wavelet with eight coefficients. 

% Copyright 2015 The MathWorks, Inc.

load soi;
wsoi = modwt(soi,'fk8');
%%
% Obtain the width of the.90, .95, and .99 confidence intervals for each 
% level. 
[~,wvarci90] = modwtvar(wsoi,'fk8',0.90);
w90 = wvarci90(:,2)-wvarci90(:,1);
[~,wvarci95] = modwtvar(wsoi,'fk8',0.95);
w95 = wvarci95(:,2)-wvarci95(:,1);
[~,wvarci99] = modwtvar(wsoi,'fk8',0.99);
w99 = wvarci99(:,2)-wvarci99(:,1);
%%
% Compare the three columns. The first column shows the .90 confidence 
% level values, the second the .95 values, and the third the .99 
% values. Each row is the width of the interval at each wavelet scale.
% You can see that the width of the confidence interval increases with 
% larger confidence level values.
[w90,w95,w99]