diff options
Diffstat (limited to 'gr-trellis')
-rw-r--r-- | gr-trellis/docs/test_tcm.py | 4 | ||||
-rw-r--r-- | gr-trellis/examples/python/test_tcm.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gr-trellis/docs/test_tcm.py b/gr-trellis/docs/test_tcm.py index e9a0ba59eb..9de627ec4c 100644 --- a/gr-trellis/docs/test_tcm.py +++ b/gr-trellis/docs/test_tcm.py @@ -82,8 +82,8 @@ def main(args): Es = 0 for i in range(len(constellation)): Es = Es + constellation[i]**2 - Es = Es / (old_div(len(constellation,dimensionality))) - N0=Es / pow(10.0,old_div(esn0_db,10.0)); # noise variance + Es = Es / (len(constellation)//dimensionality) + N0=Es / pow(10.0,esn0_db/10.0); # noise variance tot_s=0 terr_s=0 diff --git a/gr-trellis/examples/python/test_tcm.py b/gr-trellis/examples/python/test_tcm.py index e2eb87fcd7..3f81595521 100644 --- a/gr-trellis/examples/python/test_tcm.py +++ b/gr-trellis/examples/python/test_tcm.py @@ -99,8 +99,8 @@ def main(): Es = 0 for i in range(len(constellation)): Es = Es + constellation[i]**2 - Es = Es / (old_div(len(constellation,dimensionality))) - N0=Es / pow(10.0,old_div(esn0_db,10.0)); # calculate noise variance + Es = Es / (len(constellation)//dimensionality) + N0=Es / pow(10.0,esn0_db/10.0); # calculate noise variance tot_b=0 # total number of transmitted bits terr_b=0 # total number of bits in error @@ -112,7 +112,7 @@ def main(): terr_p=terr_p+(e!=0) if ((i+1)%100==0) : # display progress print(i+1,terr_p, '%.2e' % ((1.0*terr_p) / (i+1)),tot_b,terr_b, '%.2e' % ((1.0*terr_b) / tot_b)) - if e!=0: + if e!=0: print("rep=",i, e) for k in range(Kb): if pattern[k]!=0: |