Clear Filters
Clear Filters

random numbers in between two ranges

2 views (last 30 days)
hi
i want one random number generated between two ranges Like 20 and 50. i there any command who can do this. kindly help me
regards

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 13 Jun 2015
Edited: Azzi Abdelmalek on 13 Jun 2015
a=20
b=50
n=1000
v=a+(b-a)*rand(1,n)

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!