How to randomly generate all numbers in the [m, n] limit in matlab?
How to generate all numbers randomly in limit [m,n]
. To generate all numbers from 6 to 12
.. i.e. the sequence should be like [7 12 11 9 8 10 6]
.
r = randi([6 12],1,7);
But this gives the result:
[12 11 12 7 9 10 12]
Here the numbers are repeated and the sequence does not contain all numbers from 6 to 12
.
+3
source to share