Question: 1) I got the answer for part 1 clc clear all close all rng('default') % For reproducibility X = normrnd(0,1,[1,100]); Y=normrnd(0,1,[1,100]); z=X+i*Y; mag_z=sqrt(real(z).^2+imag(z).^2); mag_z2=(real(z).^2+imag(z).^2); histogram(mag_z,'Normalization','probability')

 1) I got the answer for part 1 clc clear all

1) I got the answer for part 1

clc clear all close all rng('default') % For reproducibility X = normrnd(0,1,[1,100]); Y=normrnd(0,1,[1,100]); z=X+i*Y; mag_z=sqrt(real(z).^2+imag(z).^2); mag_z2=(real(z).^2+imag(z).^2); histogram(mag_z,'Normalization','probability') title('Histogram of |z|'); figure; histogram(mag_z2,'Normalization','probability') title('Histogram of |z|^2');

2)I sitll didnt get part 2

1. Generate the empirical PDF (histogram) of IZ and |Z12 by generating n realization of X and Y where X and Y are i.i.d. Gaussian random variables of zero mean and unit variance, and obtain n realization of Z and Zl2 via Z-X Y. Plot the histogram of these samples for n-100 and compare with the theoretical PDF of Rayleigh distribution and exponential distribution. Do they agree? Hint: you need to scale the histogram in such a way that it becomes an empirical PDF Hints: If X and X2 are independent random variables uniformly distributed over [0,1], then are independent Gaussian random variables, each with zero mean and unit variance 2. Vary the variance of X and as 2-1, 3, and 5, repeat Q1 for n 1000. Comment on the result. Hint: A standard normal random variable, i.e., zero mean and unit variance, can be converted to a random variable of desired mean and variance 2, namely x~ N ,02) , by the transformation: x- + . Xstd-normal

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!