if (exist('Mawi2007C_T10h') == 0)
    load Mawi2007C_T10h
end
clf

fprintf('\n Log Log Interarrival time distribution...');
HI = HML_HInterarrivalTimes(Mawi2007C_T10h,100,0);
C = HML_PGencdf(HI(2,:));
C1 = [ HI(1,:); C ];
fprintf('OK');

semilogy(HI(1,:), HI(2,:), 'LineStyle','none','Marker','+','MarkerSize',6);
set(gca,'FontSize',22);
ylabel('Probability (log scale)');



%hold all
%loglog(C1(1,:), C1(2,:));

title('Log Log Interarrival time');
xlabel('Interarrival time (usecs)');
 

pause

fprintf('\n Log Log Interarrival time distribution (zoom)...');
HI2 = HML_HInterarrivalTimes(Mawi2007C_T10h,20,1000);
C = HML_PGencdf(HI2(2,:));
C2 = [ HI2(1,:); C ];
fprintf('OK');


bar(HI2(1,:), HI2(2,:));
hold all
plot(C2(1,:), C2(2,:));

xlabel('usecs');
set(gca,'FontSize',22);
ylabel('Probability');
legend('PMF (Histogram)','CDF (Cumulative Dist.)');

