how to get the all possible combination between two range of numbers
3 visualizzazioni (ultimi 30 giorni)
every time this code iterate random number between 1 to 4. for 1st iteration c=2 and g=2. for second iteration c=1 and g=2; i need never the combination repeated once it comes
KL il 29 Giu 2018
The example and description is a but confusing but if you ask how to get the all possible combination between two range of numbers, use perms
my_range = 1:4; %or even [1 3 5]...
c = perms(my_range)