Generate repeatable random integers within a fixed range

1 view (last 30 days)
I want to generate 4 random integers from 4 to 11. The integers are repeatable

Answers (1)

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

Tags

Community Treasure Hunt

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

Start Hunting!