Creating stimulus randomly on each trial and evaluating response accuracy at on_finish
#2760
-
Hello, I would like to ask for advice on how to create a stimulus randomly (using
The problem is that I get I couldn't find any fruitful leads among previous questions. Thank you very much |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think the stimulus property takes an HTML string so I'm not sure if you can access data attributes in it. One possibility is to create the random number as a separate variable outside the definition of the trial. That way you can access it everywhere within it:
|
Beta Was this translation helpful? Give feedback.
I think the stimulus property takes an HTML string so I'm not sure if you can access data attributes in it. One possibility is to create the random number as a separate variable outside the definition of the trial. That way you can access it everywhere within it: