Simulate the binary despatch implement picturesque in Problem 2 coercion 100000 communicated parts. Coercion
each part, principal reason the even haphazard compute generator overhead to particularize whether the communicated
part is a 0 or a 1, then reason the even haphazard compute generator to particularize whether the communicated
part is common rightly or erroneously. The program should output the presumption that a 0 is common,
the presumption that a 1 was communicated ardent that a 1 was common, and the presumption of an deception.
Submit a printout of your adjudication and the output of the program.
num = 10;
% Total extension must be even
numOfOne = num/2
% List of haphazard locations with no repeating 0s and 1s
indexes = randperm(num)
% Starting with perfect zeros
io = zeros(1, num);
% Half of them in haphazard locations, a 1
io(indexes(1:numOfOne)) = 1