Why am I getting an array of NaN when using icdf?
Show older comments
I'm trying to calculate the inverse of the cumulative normal distribution function of a set of random numbers. No matter what I do, I end up with an array of NaN. I'm pretty sure this has to do with how I've set up my random numbers, but I'm not clear on how to fix it. An example of my code is below. Thanks!
mu = 28;
sigma = 2;
P = normrnd(mu,sigma,350,1);
X = icdf('Normal',P,mu,sigma);
Accepted Answer
More Answers (0)
Categories
Find more on Random Number Generation 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!