A bug in pearsrnd?
Show older comments
With the following values for mean, std, skewness, and kurtosis, pearsrnd stalls without warning:
mean = -9.0000e-08 std = 0.6400 skewness = 2.2500e-19 kurtosis = 3.0000
Is it just my system, or do other people experience the same event?
2 Comments
David Goodmanson
on 7 Nov 2018
Edited: David Goodmanson
on 7 Nov 2018
Hi Ulrik,
Works for me in version 2017b. But it does have some interesting behavior. For your four parameter values with the minuscule but nonzero value of skewness,
[a b] = pearsrnd(mean,std,skewness,kurtosis,1,10)
gives 10 identical draws that all equal the mean, and pearson type 3. If you change the skewness to 0, the function gives sensible values for the draws and pearson type 0 (normal distribution) as it should.
Ulrik William Nash
on 7 Nov 2018
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown 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!