Answer to Question #319958 in MatLAB for OSEGO

Question #319958

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)


(iii) Prove that the full width–half maximum (FWHM), of the above distribution is given by :


FWHM = 2𝜎√2ln 2 (10)

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

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

ii:

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

>> x=-5:0.01:5;

>> plot(x,y(x))



"iii:\\\\\\max \\left( f\\left( x \\right) \\right) =\\max \\left( \\frac{1}{\\sqrt{2\\pi \\sigma ^2}}\\exp \\left( -\\frac{x^2}{2\\sigma ^2} \\right) \\right) =f\\left( 0 \\right) =\\frac{1}{\\sqrt{2\\pi \\sigma ^2}}\\\\f\\left( x \\right) =\\frac{1}{2}\\max \\left( f \\right) \\Rightarrow f\\left( x \\right) =\\frac{1}{2\\sqrt{2\\pi \\sigma ^2}}\\Rightarrow \\frac{1}{\\sqrt{2\\pi \\sigma ^2}}\\exp \\left( -\\frac{x^2}{2\\sigma ^2} \\right) =\\frac{1}{2\\sqrt{2\\pi \\sigma ^2}}\\Rightarrow \\\\\\Rightarrow \\frac{x^2}{2\\sigma ^2}=\\ln 2\\Rightarrow x=\\pm \\sigma \\sqrt{2\\ln 2}\\Rightarrow FWHM=x_2-x_1=\\sigma \\sqrt{2\\ln 2}-\\left( -\\sigma \\sqrt{2\\ln 2} \\right) =2\\sigma \\sqrt{2\\ln 2}"


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