MATLAB programs for solution: digcom_sol.m for simulation and digcom_theory.m for analytical BER. Plot of BER versus r for 3-times repetition and majority decisions