Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Simulate the binary communication channel described in Problem 2 for 100000 tran

ID: 3882544 • Letter: S

Question

Simulate the binary communication channel described in Problem 2 for 100000 transmitted bits. For
each bit, first use the uniform random number generator above to determine whether the transmitted
bit is a 0 or a 1, then use the uniform random number generator to determine whether the transmitted
bit is received correctly or incorrectly. The program should output the probability that a 0 is received,
the probability that a 1 was transmitted given that a 1 was received, and the probability of an error.
Submit a printout of your code and the output of the program.

Explanation / Answer

num = 10;

% Total length must be even
numOfOne = num/2

% List of random locations with no repeating 0s and 1s
indexes = randperm(num)

% Starting with all zeros
io = zeros(1, num);

% Half of them in random locations, a 1
io(indexes(1:numOfOne)) = 1

Rate an upvote......Thankyou

Hope this helps....