• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1function  bcount=hisser2(bs,bsr,bandfirst,bandlast)
2% function  bcount=hisser(bspectrum,bandfirst,bandlast)
3% histogram for the binary spectra
4% bcount= array of bit counts
5% bs=binary spectrum (one int32 number each)
6% bsr=reference binary spectra (one int32 number each)
7% blockSize = histogram over blocksize blocks
8% bandfirst = first band considered
9% bandlast = last band considered
10
11% weight all delays equally
12maxDelay = length(bsr);
13
14% compute counts (two methods; the first works better and is operational)
15bcount=zeros(maxDelay,1);
16for(i=1:maxDelay)
17 % the delay should have low count for low-near&high-far and high-near&low-far
18 bcount(i)= sum(bitget(bitxor(bs,bsr(i)),bandfirst:bandlast));
19 % the delay should have low count for low-near&high-far (works less well)
20% bcount(i)= sum(bitget(bitand(bsr(i),bitxor(bs,bsr(i))),bandfirst:bandlast));
21end
22