function drawaveragetimeline;
global time TimeCount
global amountinqueue amountinsystem dynamicalltimeatwork dynamicalltimeinqueue

dynamicaverageinqueue = zeros(1,TimeCount);
dynamicaverageinsystem = zeros(1,TimeCount);

for i=2:TimeCount
    dynamicaverageinqueue(i) = dynamicalltimeinqueue(i)/time(i);
    dynamicaverageinsystem(i) = (dynamicalltimeatwork(i)+dynamicalltimeinqueue(i))/time(i);
end;

figure;
    
    subplot(2,1,1); plot(time(1:TimeCount),dynamicaverageinqueue(1:TimeCount),'b');
   
    subplot(2,1,2); plot(time(1:TimeCount),dynamicaverageinsystem(1:TimeCount),'r');
   

