MATLAB: Can you pls help in solving the following question for random variables:

homeworkrandom variablesStatistics and Machine Learning Toolbox

Generate 10 uniform random variables within the range 0 and 2 and evaluate their sum and sketch the pdf for resulting random variable
&
Generate 10 exponential random variable with lambda=2 and evaluate their sum.

Best Answer

For the first question on uniform numbers, see the help for rand() - the answer is one of the examples.
For sketching the PDF, see histogram(), particularly the 'pdf' option.
for the exponential numbers, see the help for random() in the Statistics and Machine Learning Toolbox, if you have that. Exponential is one of the distributions you can select.