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?

25 views (last 30 days)
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

Roger Stafford
Roger Stafford on 7 Aug 2013
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)

dpb
dpb on 7 Aug 2013
Seems makedist is new after R2012b 'cuz it ain't here at the release.
Use
normcdf() % and friends
instead
  2 Comments
Kylie
Kylie on 7 Aug 2013
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)
dpb
dpb on 7 Aug 2013
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

Find more on Verification, Validation, and Test in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!