1function H = aggvar(sequence,isplot)
3%
'aggvar' estimate the hurst parameter of a given sequence with aggregate
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
23M = [floor(logspace(0,log10(mlarge),50))];
27cut_max = floor(6*n/10);
33 matrix_sequence = reshape(sequence(1:m*k),m,k);
34 V(i) = var(sum(matrix_sequence,1)/m);
40X = x(cut_min:cut_max);
41Y = y(cut_min:cut_max);
45beta = -(Yfit(end)-Yfit(1))/(X(end)-X(1));
52 plot(X,Yfit,
'r-',
'LineWidth',2);
53 plot(x(1:cut_min),yfit(1:cut_min),
'r:',
'LineWidth',2);
54 plot(x(cut_max:end),yfit(cut_max:end),
'r:',
'LineWidth',2);
55 xlabel(
'log10(Aggreate Level)'), ylabel(
'log10(Viance)'), title(
'Time Viance Method');