off by one bug
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 23 Mar 2018 20:29:48 +0000 (20:29 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 23 Mar 2018 20:29:48 +0000 (20:29 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@3425 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/octave/sample_clock_offset.m

index 5169178282b151566fa45886adadc1681ef0cb36..098c85e4ec08ec0f42b1bfd5153ad067c1cf594e 100644 (file)
@@ -9,7 +9,7 @@ function rx = sample_clock_offset(tx, sample_clock_offset_ppm)
   tin=1;
   tout=1;
   rx = zeros(1,length(tx));
-  while tin < length(tx)
+  while tin <= length(tx)
       t1 = floor(tin);
       t2 = ceil(tin);
       f = tin - t1;