Generate repeatable random integers within a fixed range

1 次查看(过去 30 天)
I want to generate 4 random integers from 4 to 11. The integers are repeatable

回答(1 个)

Chunru
Chunru 2021-12-1
a = randi([4 11], 4, 1)
a = 4×1
10 4 10 8

类别

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