setting a different trial duration for every trial


Author
Message
nrouhani
nrouhani
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 83, Visits: 261
Dave - Monday, March 18, 2019
nrouhani - Monday, March 18, 2019
hello, 

i was wondering whether it would be possible to have every trial have a different duration, where that trial's duration would be pulled from a list. 

thank you! 

Yes, that is absolutely possible. The /triaduration attribute accepts variables, i.e. you can easily vary it like so:

<values>
/ duration = 0
</values>

<list durations>
/ items = (1500, 3000, 4500)
</list>


<trial exampletrial>
/ ontrialbegin = [
values.duration = list.durations.nextvalue;
]
/ stimulusframes = [1=examplestimulus]
/ validresponse = (0)
/ trialduration = values.duration
</trial>

<text examplestimulus>
/ items = ("Duration of this trial: <%values.duration%> ms.")
</text>

<block exampleblock>
/ trials = [1-3=exampletrial]
</block>

thank you so much!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K
nrouhani - Monday, March 18, 2019
hello, 

i was wondering whether it would be possible to have every trial have a different duration, where that trial's duration would be pulled from a list. 

thank you! 

Yes, that is absolutely possible. The /triaduration attribute accepts variables, i.e. you can easily vary it like so:

<values>
/ duration = 0
</values>

<list durations>
/ items = (1500, 3000, 4500)
</list>


<trial exampletrial>
/ ontrialbegin = [
values.duration = list.durations.nextvalue;
]
/ stimulusframes = [1=examplestimulus]
/ validresponse = (0)
/ trialduration = values.duration
</trial>

<text examplestimulus>
/ items = ("Duration of this trial: <%values.duration%> ms.")
</text>

<block exampleblock>
/ trials = [1-3=exampletrial]
</block>

nrouhani
nrouhani
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 83, Visits: 261
hello, 

i was wondering whether it would be possible to have every trial have a different duration, where that trial's duration would be pulled from a list. 

thank you! 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search