I am trying to find the cumulative distribution function of the standard normal. I have the value that I will be using the cdf to analyze but cannot figure out the functions to go with it. Can anyone help me find the correct functions/code?

Below is the code I attempted to run..but it isn't recognizing the makedist function.
x = 0.24 mu = 0 sigma = 1
pd = makedist('Normal')
y = cdf(pd,x)

 Accepted Answer

Use matlab's 'erfc' function in place of 'normcdf' if you don't have the Statistics Toolbox according to the formula:
normcdf(x) = 1/2*erfc(-x/sqrt(2))

More Answers (1)

Seems makedist is new after R2012b 'cuz it ain't here at the release.
Use
normcdf() % and friends
instead

2 Comments

I have tried that..so the code is: x = 0.24 mu = 0 sigma = 1
normcdf(x)
and this is the error message I get back:
??? Undefined function or method 'normcdf' for input arguments of type 'double'.
Error in ==> untitled7 at 5 normcdf(x)
Apparently you don't have the Statistics Toolbox installed (or installed correctly, anyway).
What does
ver
return? Will list installed toolboxen and versions.

Sign in to comment.

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!