Hi everybody, I'm struggling with the randomization of the trials presented in my computerized task. I have to present a sequence of 5 numbers (range from 1 to 4) 100 times. I want that each row of the array contains 5 numbers without repeating two times consecutively the same number. Example :
%Wrong pseudorandom
1 2 2 1 4
3 3 4 1 2
1 4 4 4 2
…
%Right pseudorandom
1 2 3 1 4
2 3 4 1 2
1 4 2 4 3
…
Many thanks for any suggestions,
FM
Best Answer