function [ onOffPary, pocetParu, delky ] = pocatkyAKonceJednicek( boolVector )
onOffPary=[];
delky=[];
stav=1;
counter=1;
temp=0;
for i=1:1:max(size(boolVector))
    if stav==2&&boolVector(i)==0
        stav=1;
        onOffPary(counter,2)=i-1;
        delky(counter,1)=temp;
       counter=counter+1;
    end
    
    if stav==1&&boolVector(i)~=0
        stav=2;
        temp=0;
        onOffPary(counter,1)=i;
    end
    temp=temp+1;
end
if stav==2
onOffPary(counter,2)=i;
delky(counter,1)=temp;
counter=counter+1;
end

pocetParu=counter-1;
onOffPary=uint32(onOffPary);
end

