Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function probs = calculate_asymptotic_erasure_prob_to_arr(iterations, erasure_prob, bit_degree, check_degree)
- if iterations == 0
- probs = erasure_prob;
- else
- probs = calc_prob( ...
- bit_degree, ...
- check_degree, ...
- erasure_prob, ...
- calculate_asymptotic_erasure_prob_to_arr(iterations-1, bit_degree, check_degree, erasure_prob));
- end
- end
- function prob = calc_prob(bit_degree, check_degree, erasure_prob, bit_prob)
- chd = check_degree-1;
- bd = bit_degree - 1;
- prob = erasure_prob*(1 - (1 - bit_prob)^chd)^bd;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement