How to change the random distribution to Weibull distribution?

2 Ansichten (letzte 30 Tage)
Aukhat Uap
Aukhat Uap am 23 Mär. 2017
Beantwortet: Omanshu Thapliyal am 27 Mär. 2017
My supervisor wants me to use the scripts he provided and change the random distribution of the cracks to Weibull or Gaussian distribution. I have tried to fit in the method described in mathworks for Weibull distribution but I do not see any changes on the results since I was just inputing the codes. I have attached the scripts for the calculation of crack density where the cracks are distributed randomly.

Antworten (1)

Omanshu Thapliyal
Omanshu Thapliyal am 27 Mär. 2017
It seems like you want to change your random variable 'r' from uniform to Gaussian or Weibull. Currently, random variable 'r' is distributed uniformly in your code as
r = rand(L,L)
because the function rand by default returns uniform random variables in the open interval (0,1).
You might want to use normrnd or wblrnd to get Gaussian or Weibull random variables instead. You could do so by calling
r = normrnd(mu, sigma, L, L)
r = wblrnd(a, b, L, L)
where mu, sigma, a, and b represent the standard distribution parameters as in the documentation.

Community Treasure Hunt

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

Start Hunting!

Translated by