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

    %% Hurst Parameter Estimation
% This example shows how to estimate the Hurst index of a fractional
% Brownian motion. The example simulates 1,000 realizations of fractional
% Brownian motion with H=0.6. Each realization consists of 10,000 samples.
% At the end of the simulation, the three estimates of the Hurst index are
% compared.
%%
% Initialize the random number generator for repeatable results. Set the
% Hurst index equal to 0.6 and the length of the realizations to be 10,000.

% Copyright 2015 The MathWorks, Inc.

rng default;
H = 0.6;
len = 10000;
%%
% Generate 1,000 realizations of fractional Brownian motion and compute the
% estimates of the Hurst parameter.
n = 1000; 
Hest = zeros(n,3);
for ii = 1:n
	fBm06 = wfbm(H,len);
	Hest(ii,:) = wfbmesti(fBm06);
end
%%
% Compare the estimates.
subplot(311), histogram(Hest(:,1)); 
title('Discrete second derivative estimator (DSOD)')
subplot(312), histogram(Hest(:,2)); 
title('Wavelet version of DSOD') 
subplot(313), histogram(Hest(:,3)); 
title('Wavelet details regression estimator')
xlabel('True value of the parameter H = 0.6')