Question

Matlab Create plot of the following density functions using x values between -10 and 10 with...

Matlab

Create plot of the following density functions using x values between -10 and 10 with an increment of 0.02

-Normal cumulative distribution function with mu=1, sigma=1, mu=0, sigma=2, mu=0,sigma=1/2

Homework Answers

Answer #1

Use the following code for each case -

i) mu=1, sigma=1

function plotNormCDF(u,s,color)
mu = 1;
sigma = 1;
x = -10 : 0.02 : 10;
cdfNormal = normcdf(x, mu, sigma);
plot(x,cdfNormal,blue)
end

--------------------

ii) mu=0, sigma=2

function plotNormCDF(u,s,color)
mu = 0;
sigma = 2;
x = -10 : 0.02 : 10;
cdfNormal = normcdf(x, mu, sigma);
plot(x,cdfNormal,black)
end

----------------------------

iii) mu=0,sigma=1/2

function plotNormCDF(u,s,color)
mu = 0;
sigma = 0.5;
x = -10 : 0.02 : 10;
cdfNormal = normcdf(x, mu, sigma);
plot(x,cdfNormal,red)
end

__________________________________

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Using for loop and if statement, write a MATLAB code to plot a graph for x(t)...
Using for loop and if statement, write a MATLAB code to plot a graph for x(t) as a function of time t in the range 0 to 12 in increment of 0.01 ?(?) = 1: 0 ≤ ? ≤ 1 2? − 1 1 ≤ ? ≤ 2 3 2 ≤ ? ≤ 3 −2.5? + 10.5 3 ≤ ? ≤ 5 −2 5 ≤ ? ≤ 6 4/3 ? − 10 6 ≤ ? ≤ 9 2 9 ≤...
Write a Matlab program to plot the cosine wave. That is plot y=cos(k1x) vs. x for...
Write a Matlab program to plot the cosine wave. That is plot y=cos(k1x) vs. x for x varying from 0 to 2pi radians. The value of k1 is given at the end of this document. You can choose the increment for x. Note that large values of the increment will give you a coarse graph. Note: Matlab has two functions to calculate the sine of an angle: sin(x) and sind(x). What is the difference between these two functions? Use help...
Using Matlab, evaluate ? = (? + 10) (?^5 + 1) for values of x in...
Using Matlab, evaluate ? = (? + 10) (?^5 + 1) for values of x in the range of -1 to 1 in step sizes of 0.1. Hence, plot y versus x. Could you also include the Matlab code and the associated screenshots?
(a) Generate the following discrete functions using MATLAB. Plot the two functions on the same page...
(a) Generate the following discrete functions using MATLAB. Plot the two functions on the same page using MATLAB stem function. For x2[k] plot the real and imaginary parts separately. Therefore, a total of three plots will be plotted on one page. (i) x1[k]= -5.1sin((0.1*pi*k)-3*pi/4)+1.1cos(0.4*pi*k) such that k belongs in[-10,40] (ii)x2[k]= ((-0.9)^k)*exp(i*pi*k/10) such that k belongs in[0,100] (b) Are x1[k] and x2[k] periodic sequences. If so, what are their periods? Mark them on the plots. (c) Calculate the total energy of...
Q) a) create a matrix named as X of evenly spaced values from 0 to 50,...
Q) a) create a matrix named as X of evenly spaced values from 0 to 50, with an increment of 10. b) a) create a matrix named as Y of evenly spaced values from 500 to 1000, with an increment of 3. c)a) create a matrix named as Z, the value of the 1st row is from 1 to 10, 2nd row from 2 to 20 with increment of 2, 3rd row 3 to 12. using subplot divide the window...
For each of the following functions fi(x), (i) verify that they are legitimate probability density functions...
For each of the following functions fi(x), (i) verify that they are legitimate probability density functions (pdfs), and (ii) find the corresponding cumulative distribution functions (cdfs) Fi(t), for all t ? R. f1(x) = |x|, ? 1 ? x ? 1 f2(x) = 4xe ?2x , x > 0 f3(x) = 3e?3x , x > 0 f4(x) = 1 2? ? 4 ? x 2, ? 2 ? x ? 2.
Use Matlab to solve the following (a) Create a plot with a sphere at the center...
Use Matlab to solve the following (a) Create a plot with a sphere at the center of the graph (origin) representing the sun with a radius of 6955000 km. Make sure that the outside of the sphere is painted in ’autumn’ colors. (Hint: look up the sphere() function, the colormap() function, and the surf() function). (b) Create a variable t ranging from 0 to 2? with increments of 0.01. (c) The following Table gives you important values needed to compute...
In MATLAB, generate a 3D plot as follows: Create 2 vectors x and y, both ranging...
In MATLAB, generate a 3D plot as follows: Create 2 vectors x and y, both ranging from -5 to 5 with interval of 0.05 using linspace or colon operator. Generate grid of values X and Y using the vectors x and y. Define the variable Z as follows: Z = 2X3 + 4Y2 + 7 +sinX3 + Y2 Generate a surface and a mesh plot with the variables X,Y,Z. Show your plots.
Using MATLAB The range of an object shot at an angle θ (with respect to x-axis),...
Using MATLAB The range of an object shot at an angle θ (with respect to x-axis), with the initial velocity of V0 (in the absence of air resistance), is calculated by the following formula: range=(Vo^2/g)(sin(2theta)) where (0<=theta<=pi/2) And the trajectory of object is given by:     h=tan(theta).x-(g/2Vo^2*cos^2(theta)).x^2 .Where h is the height of the object at each x location and g = 9.81 m/s2. a) Using π/8 increment size for the angle and V0 = 10 m/s, plot the trajectories of...
2) (USE MATLAB) Create a function called g that satisfies the following criteria. (Hint: Find function)...
2) (USE MATLAB) Create a function called g that satisfies the following criteria. (Hint: Find function) For x < -π                    g(x) = -1 For x ≥ -π and x ≤ π    g(x) = cos(x) For x >π                      g(x) = -1 Plot your results for values of x from -2p to +2p. Choose your spacing to create a smooth curve.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT