Hey there, is there any way to 'mix up' the order of the elements of an input vector in matlab randomly? Say I input
[1:5]'
I wanna get out for example:
[3 5 1 2 4]'
thanks!
Use RANDPERM:
shuffledOutput = inputVector(randperm(length(inputVector)));