www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/BiasedvsUnbiasedEstimatorsWaveletVarianceExample.m
%% Compare Number of Coefficients for Unbiased and Biased Variance Estimates % Compare the number of coefficients for unbiased and biased wavelet % variance estimates. For the unbiased (default) estimates, the number of % nonboundary coefficients decreases by scale. For biased estimates, the % number of coefficients matches the number of input rows and is constant % for every scale. %% % Obtain the MODWT of the Southern Oscillation Index data using the % Fejer-Korovkin wavelet with eight coefficients. Compute the unbiased and % biased estimates of the wavelet variance down to level ten. The number of % coefficients used in the unbiased estimates decrease by scale. % Copyright 2015 The MathWorks, Inc. load soi wsoi = modwt(soi,'fk8'); [wvar_unb,wvarci_unb,nj_unb] = modwtvar(wsoi,'fk8'); [wvar_b,wvarci_b,nj_b] = modwtvar(wsoi,'fk8',[],'EstimatorType','biased'); [nj_unb(1:10),nj_b(1:10)]