how to generate non integer random number in between two numbers.

16 次查看(过去 30 天)
I want to generate single random number which is in between 0.86 and 1. how to generate it.

回答(1 个)

Star Strider
Star Strider 2016-10-22
Try this:
desired_random_number = 0.86 + (1 - 0.86) * rand;

类别

Help CenterFile Exchange 中查找有关 Random Number Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by