random numbers in between two ranges

3 次查看(过去 30 天)
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

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2015-6-13
编辑:Azzi Abdelmalek 2015-6-13
a=20
b=50
n=1000
v=a+(b-a)*rand(1,n)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by