function [] = growingN(Trr,Trsi,BW,PLrr,PLrsi,N)
index = 1;
n =  [0:10:N];
N = length(n);
H(1:N)=1;
FTlast = (n*PLrr/(Trr*BW*0.035));
loop = 1;
N
calcNextlevel = false;
while (loop<N+1)
   
    if (FTlast(loop)>1)
        index = loop
        calcNextlevel = true;
        newFTlast = FTlast(loop:N);
        H(index:N) = 2;
        loop = N;
   
    end
    loop = loop +1 ;
end

calcNextlevel
   
if (calcNextlevel == 1)
    FTlastOne =  (newFTlast*PLrsi/(Trsi*BW*0.035));

loop = 1;
count = length(FTlastOne)
calcNextlevel = false;
while (loop<count)
   
    if (FTlastOne(loop)>1)
        index = index + loop
        calcNextlevel = true;
        newFTlastOne = FTlastOne(loop:count);
        loop = count;
        H(index:N) = 3;
    end
    loop = loop +1 ;
end
calcNextlevel
end

if (calcNextlevel == 1)
    FTlastTwo =  (newFTlastOne*PLrsi/(Trsi*BW*0.035));

loop = 1;
count = length(FTlastTwo)
calcNextlevel = false;
while (loop<count)
   
    if (FTlastTwo(loop)>1)
        index = index + loop
        calcNextlevel = true;
        newFTlastTwo = FTlastTwo(loop:count);
        loop = count;
        H(index:N) = 4;
    end
    loop = loop +1 ;
end
if (calcNextlevel == 1)
    'Prilis mnoho uzivatelu'

end


end


semilogx(n,H,'LineWidth',2);
grid on
title('Zavislost velikosti stromu na rostoucim poctu uzivatelu [N]')
xlabel('N \rightarrow')
ylabel('vyska stromu')
%legend('N');
