1function H = per(sequence,isplot)
3%
'per' estimate the hurst parameter of a given sequence with periodogram
7% sequence: the input sequence
for estimate
8% isplot: whether display the plot. without a plot
if isplot equal to 0
10% H: the estimated hurst coeffeient of the input sequence
13% Version 1.0, 03/10/2008
23P_origin = abs(Xk).^2/(2*pi*n);
24P = P_origin(1:floor(n/2)+1);
26x = log10((pi/n)*[2:floor(0.5*n)]);
27y = log10(
P(2:floor(0.5*n)));
29% Use the lowest 20% part of periodogram to estimate the similarity.
30X = x(1:floor(length(x)/5));
31Y = y(1:floor(length(y)/5));
34H = (1-(Yfit(end)-Yfit(1))/(X(end)-X(1)))/2;
39 plot(X,Yfit,
'r-',
'LineWidth',3);
40 xlabel(
'log10(Frequency)'),ylabel(
'log10(Periodogram)'),title(
'Periodogram Method');