HP Forums

Full Version: how to shuffle list / randomize list items ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
is there a way to shuffle / randomize list items ?
for example, I have L1:={ 2, 4, 6, 8, 10}
and I want something randomly unsorted, (with same items).

Thank you.
mat2list(randperm(L1)) will return a random permutation of the elements of L1.
At least there is randperm which you can take as a basis für constructing your shuffled list using commands for lists.
Arno
Thanks both,

Merci bcp Didier, Viele Danke Arno.
Pas de quoi.
Reference URL's