Question: Solve the following problem in MATLAB: ( a ) Ask MATLAB to generate a vector, x , of length 1 0 0 0 0 with

Solve the following problem in MATLAB: (a) Ask MATLAB to generate a vector, x, of length 10000 with all entries being independently and identically distributed as uniform from 0 to 2. (b) Compute the vector w = xx where denotes the element-wise multiplication, alternatively known as the Hadmard product, of two vectors. Note that the MATLAB operator * does not calculate the element-wise product. (c) Compute the vector v =1/x where 1 is a vector of all ones the same size as x, and / denotes element-wise division, alternatively known as Hadamard division. Note that the MATLAB operator / does not perform element-wise division. (d) Plot histograms of the distribution of the values of and vectors. Ensure that you have at least 100 bins of values. You will find the matlab histogram function useful. Adjust the histograms so that at least 100 bins of with significant counts of samples are shown. (e) Analytically compute the probability density functions (pdfs) for the random variables W = X2 and V =1/X where X is a random variable with a uniform density ranging from 0 to 2: p (X = x)= 0 x <0 1 20<= x <=2 0 x >2 . Plot these pdfs and ensure that they are consistent with the histograms created in part (d). You may find it useful to compute the cumulative distribution functions (cdfs) and use the bin edges from the histograms.

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!