[Eeglablist] Random selection of trials

Delorme, Arnaud adelorme at ucsd.edu
Tue Nov 24 08:52:04 PST 2020


—— Message posted on behalf of Anna Fisher

Dear all,
I am trying to match the numbers of trials in my two experimental conditions (something like an Oddball task), and I’d be very grateful for any idea or advice.

I have pre-processed the data including epoching, baseline correction and ICA. Before averaging the ERPs, I would like to match the number of trials in the frequent condition with the number of trials in the rare condition by randomly choosing the appropriate amount from the trials in the frequent condition. The trials in the rare condition are in bin 2 (or in bin 2 and 3), the frequent condition epochs are stored in bin 1.

My main problem right now is that I cannot find a way to extract the number of elements (i.e. epochs) in the rare condition to then select the same number of trials randomly from the frequent condition.

Thanks a lot in advance for any help!

Anna


More information about the eeglablist mailing list