How to change the random distribution to Weibull distribution?
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Omanshu Thapliyal
2017-3-27
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)
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!