This is the final Matlab Project which contains 4 questions of simulating some probability concepts and their applications.
The full code is pretty long so I only share a small part of question 2 in which I simulated BEC channel using N-single-parity code. Full code is in Appendix part of the report. N-Single-Parity Code is interesting as the receivers are capable of reconstructing the signal as long as no more than 1 bit being erasured.
I got 95/100 for this project because of the minor mistake of misunderstanding another part of question 2.
My report was written in Latex in which I used "mcode" package from Matlab to attach my code in a nicer format. Hope this helps!