Use a computer to plot the function xne?x and the Gaussian

Chapter , Problem 12P

(choose chapter or problem)

Get Unlimited Answers
QUESTION:

Problem 12P

Use a computer to plot the function xnex and the Gaussian approximation to this function, for n = 10, 20, and 50. Notice how the relative width of the peak (compared to n) decreases as n increases, and how the Gaussian approximation becomes more accurate as n increases. If your computer software permits it, try looking at even higher values of n.

Questions & Answers

QUESTION:

Problem 12P

Use a computer to plot the function xnex and the Gaussian approximation to this function, for n = 10, 20, and 50. Notice how the relative width of the peak (compared to n) decreases as n increases, and how the Gaussian approximation becomes more accurate as n increases. If your computer software permits it, try looking at even higher values of n.

ANSWER:

Solution to 12P

Step 1

f(x)=xne-x is a gaussian approximation function which reaches maximum value when x=n. We are using Matlab to plot the function. For N=10,20 and 50. The relative width of the gaussian curve is decreased as n increased and the gaussian approximation becomes more accurate as n increases.

Matlab Code:

clear all

clf

clc

x = 0:.01:100;

plot(x,((x.^10).*exp(-x))/max((x.^10).*exp(-x)),'-g');hold on;

plot(x,((x.^20).*exp(-x))/max((x.^20).*exp(-x)),'-r');hold on;

plot(x,((x.^50).*exp(-x))/max((x.^50).*exp(-x)),'-k');hold on;

xlabel('n')

ylabel('x.^n.*exp(-x)')

title('plot of gaussian approximation for N=10,20 and 50')

legend('N=10','N=20','N=50')

grid on;

Add to cart


Study Tools You Might Need

Not The Solution You Need? Search for Your Answer Here:

×

Login

Login or Sign up for access to all of our study tools and educational content!

Forgot password?
Register Now

×

Register

Sign up for access to all content on our site!

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back