1function H = absval(sequence,isplot,moment)
3%
'absval' estimate the hurst parameter of a given sequence with absolute
7% sequence: the input sequence
for estimate
8% isplot: whether display the plot. without a plot
if isplot equal to 0
9% moment: a positive interger which used to calculate absolute moment
11% H: the estimated hurst coeffeient of the input sequence
14% Version 1.0, 03/10/2008
27sequence = sequence - mean(sequence);
30M = [floor(logspace(0,log10(mlarge),50))];
34cut_max = floor(6*n/10);
40 matrix_sequence = reshape(sequence(1:m*k),m,k);
41 A(i) = sum((abs(mean(matrix_sequence))).^moment)/k;
47X = x(cut_min:cut_max);
48Y = y(cut_min:cut_max);
53alpha = (Yfit(end)-Yfit(1))/(X(end)-X(1));
60 plot(X,Yfit,
'r-',
'LineWidth',2);
61 plot(x(1:cut_min),yfit(1:cut_min),
'r:',
'LineWidth',2);
62 plot(x(cut_max:end),yfit(cut_max:end),
'r:',
'LineWidth',2);
63 xlabel(
'Log of Aggreate Level'), ylabel(
'Log of Absolute Moment'), title(
'Absolute Moment Method');