segmentlength=4096*52;
numsegments=2000;
n1a=randn(segmentlength/2,1);
n2a=randn(segmentlength/2,1);
d=[];
for in=1:numsegments
n1b=randn(segmentlength/2,1);
n2b=randn(segmentlength/2,1);
zpad=zeros(segmentlength,1);
na=[n1a;n2a;zpad];
nb=[n1b;n2b;zpad];
fa=fft(na);
fb=fft(nb);
fa(1)=fa(1)+j*fa(end/2+1);
fb(1)=fb(1)+j*fb(end/2+1);
fc=conj(fa(1:end/2)).*fb(1:end/2);
outputlength=segmentlength/26;
c=zeros(outputlength,1);
for jn=1:26
c=c+fc((jn-1)*outputlength+1:jn*outputlength);
end
d=[d;c];
n1a=n1b;
n2a=n2b;
end

