How to generate random number within a range?

2 views (last 30 days)
I want to generate a random number between 0.2 to 1

Accepted Answer

Stephen23
Stephen23 on 27 Jan 2020
>> 0.2+(1-0.2)*rand()
ans =
0.85178

More Answers (0)

Categories

Find more on Random Number Generation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!