Hi,
I would like to create a vector y with several repetions i of another randomly sorted vector x, i.e. y = [randperm(x), randperm(x), randperm(x), …], but without repeatedly using randperm().
For example: Given x = [1, 2, 3, 4] I would like to create a vector y = [2, 4, 1, 3, 1, 4, 3, 2] (which contains i = 2 two several random permutations of x).
Is there any function that I can use for this purpose?
Thanks in advance, Alex
Best Answer