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
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
__________________________________
Get Answers For Free
Most questions answered within 1 hours.