How to generate random number within a range?

 Accepted Answer

>> 0.2+(1-0.2)*rand()
ans =
0.85178

2 Comments

@VIJAY: please don't forget to accept my answer!

Sign in to comment.

More Answers (0)

Tags

Asked:

on 27 Jan 2020

Commented:

on 27 Jan 2020

Community Treasure Hunt

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

Start Hunting!