Generates random numbers based on Pearson type IV distribution. Please refer to pearson4pdf for more details on the Pearson type IV distribution probability density function.
Syntax |
Description |
---|---|
out = randpearson4(N,mu,sigma,gamma1,beta2); |
Returns N random numbers with the probability based on the Pearson type IV distribution. Please refer to pearson4pdf for the definition of µ, σ, γ 1 , and β 2 (β 2 =3+δ). |
Examples
This example generates a Pearson type IV distribution, and randomly generates 200 points based on this distribution probability density function.
x = -10:0.1:10;
mu = 1;
sigma = 2;
gamma1 = 3;
beta2 = 70;
y = pearson4pdf(x, mu, sigma, gamma1, beta2);
plot(x, y, "", "", "Pearson type 4 PDF");
N = randpearson4(200, mu, sigma, gamma1, beta2);
histc(N, 20);
The two plots generated by the above code are the probability distribution density function for Pearson type IV distribution, and the histogram of 200 random samples chosen based on the pdf, respectively.
See Also