Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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=cusum(P)/sum(P);
The output of the histogram is supposed to have the original random vector and another vectore almost identical, but i dont know how that works.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions