Counting a Variable
Hello, I have an experiment that I am working on that has participants receiving one of 4 variables randomly and I want the experiment to keep count of how many times the participant receives variables a and b. and at each reiteration of the task if the participant receives variable a or b they are shown a number that increases.
However, I am unable to figure out how to call an instance of the variable occurring and increase the number. Any help would be appreciated
Comments
Hi,
Just to avoid confusion, I suspect that you mean that you have one variable, let's call it
my_var, which can have two possible values, 'a' and 'b'. Right?If so, you could count the number of occurrences of each value with a simple
inline_scriptlike this:Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Sebastiaan, This is what I have. I need to count the variables that give the reward of Star and show how many Stars the participant has earned after each instance.
Why don't you try to implement my solution yourself first?
Essentially, all you need to do is change the variable names in the script, and figure out how to insert the script into your experiment.
Check out SigmundAI.eu for our OpenSesame AI assistant!