In may wireless communication they dirive a CDF and PDF then they conferme the theorical result with simulation My question how the sumulat. For example suppose we have 3 random varibles $h_i$ wish are zero-mean, independent, circularly symmetric complex Gaussian random variables with variances $\delta^2_i$. $|h_i|^2$ is expontial with parametre $\beta_i$. We want to drive PDF and CDF of random varible $$z=\max\{|h_1|^2,|h_2|^2,|h_3|^2\}$$.
the CDF of $z$ is $$F_Z(z)=(1-e^{(-\beta z)})^3$$ and pdf $$ P_Z(z)=3\beta e^{(-\beta z)}(1-e^{(-\beta z)})^2 $$. My question how to plot the theorical CDF and PDF in matlab and do simulation. In matlab we generate $h$ as follow $$h=(randn(1,Nsym)+1j*randn(1,Nsym))$$
First off you want to generate samples of the max of three so do
Now $h$ is the $1\times N$ vector you want the sample statistics of. For the empirical CDF, you can do
There's also a builtin ecdf function in newer versions.
For the empirical PDF, there's a few options... there's Kernel densities which have a matlab builtin you can search for. The most straightforward 'by hand' is just doing a normalized histogram
edit
More detail: