Generating a sequence of numbers

0 votes
asked Apr 13, 2016 by Olga
Hi! How can I generate the sequence of two numerals (1 and 2) in such a way, that the length of this sequence would be 500 and there was 250 values of 1 and 250 values of 2? And how I should call one by one, consequently, all the elements during the experiment? Thanks

1 Answer

0 votes
answered Apr 13, 2016 by Maria Molodova (8,660 points)
selected Apr 13, 2016 by qandaadmin
Best answer

Such sequence can be easily generated by the standard Roulette element. You need to set the value range just to numbers 1 and 2 and then change the occurrence frequencies for each of the number to 250. It can be done with the [Value Frequency] property on Roulette, as shown below:






With these settings a random sequence with 500 values in total will be generated.

commented Apr 13, 2016 by Olga
Many thanks, than I put this roulette element before the trial loop, to prevent regeneration in every trial, and then using [Random Values] property I can call consequently each element, RandomValues[1], correct?
commented Apr 13, 2016 by Maria Molodova (8,660 points)
If you need to read more than one value at the same time then that is the right way. Just note that the first value will be RandomValue[0], not RandomValues[1]. However, if you need just one random value per trial, the typical scenario, when the roulette is located at the start of the trial loop would work too. The value of another property [Random Value] will roll through all 500 generated numbers automatically.

Welcome to EventIDE Q&A forum where you can ask questions about EventIDE software and receive answers from other members of the community

FAQ questions

Installation and License



EEG Analysis

Visual Stimuli

Runtime and Data Collection