How to generate rayleigh random variables with specified mean value having minimum value?

2 ビュー (過去 30 日間)
I want to generate Rayleigh random variables having specified mean value. I want the random numbers with specified minimum value as well. How can I do that? please help.

採用された回答

the cyclist
the cyclist 2019 年 11 月 22 日
If you have the Statistics and Machine Learning Toolbox, then you can generate n Rayleigh-distributed random numbers using the raylrnd function:
r = raylrnd(b,n,1);
Choose the parameter b to be equal to the mean you want times sqrt(2/pi).
The Rayleigh distribution has a minimum of zero, so if you want a non-zero minimum, you have criteria that cannot be met simultaneously: Rayleigh-distributed, and non-zero minimum. You'll have to give up one of those.
One possibility would be to add a constant K to your randomly chosen values (and subtract K from the mean value you generate). Then your distribution would have the shape of a Rayleigh distribution, offset by that constant.
  2 件のコメント
Jaydeep Kansara
Jaydeep Kansara 2019 年 11 月 22 日
編集済み: Jaydeep Kansara 2019 年 11 月 22 日
Thanks for the reply.
What can i do for the log-normal distribution?
My mean is 58, COV is 0.19.minimum value of random number required is 40.
What should I do?
the cyclist
the cyclist 2019 年 11 月 22 日
Use the lognrnd function.
The relationship between the distribution parameters, and the mean and variance, is a bit more complex. Take a look at "descriptive statistics" section of this documentation page.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by