Matlab programs need to be explained through comment lines.
a- Use Matlab to generate uniform, exponential, Rayleigh, and gamma RVs for different values of the parameters a and b. Plot the probability density function (pdf) curves for each RV and compare with the analytical pdfs.
b- It is well-known that the sum of independent and identically distributed exponential RVs has a gamma distribution. Generate six independent exponential RVs with a=0 and b=4 (or mu=4), sum them and plot the pdf of the sum. Compare the obtained pdf with the theoretical gamma pdfand comment on the obtained results.