x=zeros(1,1000);
x(1:99:end)=10;
x(34:99:end)=10;


[ac,lag]=xcorr(x,'coeff');

plot(lag,ac)


figure

plot(lag(end/2:end),ac(end/2:end));
