Answer to Question #319954 in MatLAB for Cee

Question #319954

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)




1
Expert's answer
2022-03-29T05:18:53-0400

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS