Error Correction Code (Repetition)

0

I have some doubts in this code. I would like if someone could explain the functions to me.

from scipy.stats import binom
import matplotlib.pyplot as plt
import numpy as np


r=[2*i+1 for i in range(4)]

def single_bit_error(r, p=0.05):

    return 1-binom.cdf(r//2, r, p)

def message_error(r, p=0.05):

    return 1-(1-single_bit_error(r,p))**256

message_error(12)

plt.semilogy(r, [message_error(i) for i in r])'
    
asked by anonymous 04.10.2017 / 01:12

0 answers