Weibull random numbers
x = distfun_wblrnd ( a , b ) x = distfun_wblrnd ( a , b , [m,n] ) x = distfun_wblrnd ( a , b , m , n )
a matrix of doubles, the scale parameter, a>0.
a matrix of doubles, the shape parameter, b>0.
a 1-by-1 matrix of floating point integers, the number of rows of x
a 1-by-1 matrix of floating point integers, the number of columns of x
a matrix of doubles, the random numbers, x>=0
Generates random variables from the Weibull distribution.
Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.
// Use x = distfun_wblrnd(a,b) x=distfun_wblrnd(1:6,(1:6)^-1) // Check x = distfun_wblrnd ( a , b , v ) x = distfun_wblrnd(2,1,[3 2]) // Check mean and variance a = 2; b = 3; x=distfun_wblrnd(a,b,[1000,1]); [M,V] = distfun_wblstat ( a , b ) Mx = mean(x) Vx = variance(x) // Make a plot of the actual distribution of the numbers a = 2; b = 3; x = distfun_wblrnd(a,b,1,1000); scf(); histplot(10,x) x = linspace(0,4.,1000); y = distfun_wblpdf(x,a,b); plot(x,y) xtitle("Weibull random variables","X","Density"); legend(["Empirical","PDF"]); | ![]() | ![]() |