Question #319252

The Gaussian distribution also known as the Normal distribution, is given by the following


equation:


š‘¦(š‘„) = š‘’š‘„š‘ āˆ’(š‘„āˆ’šœ‡)^2/2šœŽ^2



where parameter š is the mean and šˆ the standard deviation.


(i) Write a MATLAB code to create a 1000 point Gaussian distribution of random numbers


having šœ‡ = 0 and šœŽ = 1. (20)


(ii) Plot this distribution. (10)

Expert's answer

i: >>x=normrnd(0,1,1000);

ii:

>> y=@(x)exp(-x.^2/2);

>> x=-5:0.01:5;

>> plot(x,y(x))


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS