Question: Replace the random bit generator in the previous assignment with an integer source that generates numbers from 1 to N where the probability of getting

Replace the random bit generator in the previous assignment with an integer source that generates numbers from 1 to N where the probability of getting the outcome x[n]=i is equal to P-i taken from a vector that is user generated. So in your script, create P=[P-1,P-2,dots,P-N] and use this in your circuit. After you run your circuit, generate a histogram that should match this vector. To test your code, try setting P as follows:
% let the user specify how the source probabilities as a vector P=[1:5]!???2;
P=cum??P? sum (P);
 Replace the random bit generator in the previous assignment with an

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!