Selection variable question

Mark Histed's Avatar

Mark Histed

10 Apr, 2012 01:19 PM

Chris, you attached an example to this question.

I don't understand what the list and the range replicator are for. In general I have no idea what lists are used for. Can you explain?

thanks!
Mark

  1. Support Staff 1 Posted by Christopher Sta... on 10 Apr, 2012 04:56 PM

    Christopher Stawarz's Avatar

    Hi Mark,

    The block, trial, and list paradigm components are basically identical. The only difference is that block and trial increment a system variable (#announceBlock and #annouceTrial [sic], respectively) when entered and decrement it upon exit, while list does not. If you don't make use of those variables when analyzing your data, then you can consider the three interchangeable.

    In the example experiment, the range replicator creates nine identical copies of "New List". The result is that, when the experiment runs, "New List" executes nine times in succession. The purpose is to demonstrate the selection variable (which contains three values) being exhausted and reset three times in a row. In a real experiment, you'd probably use a state system instead of a range replicator to control repetition.

    If you have any more questions, please let me know!

    Chris

  2. 2 Posted by Mark Histed on 10 Apr, 2012 07:49 PM

    Mark Histed's Avatar

    Thanks Chris, that makes sense.
    If I remove the list it no longer changes the selection variable.
    Why is that? Does the range replicator replicate the object it contains? (Shows how little I understand about the mworks code structure). If so, does it only replicate a single object or can it contain multiple objects (i.e. trials or lists?)
    Would it work identically if I just set the Protocol nsamples to 9 and removed both the list and range replicator?

    I have one more set of questions I will send separately. Thanks!

  3. Support Staff 3 Posted by Christopher Sta... on 12 Apr, 2012 03:51 PM

    Christopher Stawarz's Avatar

    Hi Mark,

    If I remove the list it no longer changes the selection variable. Why is that? Does the range replicator replicate the object it contains? If so, does it only replicate a single object or can it contain multiple objects (i.e. trials or lists?)

    According to the rules defined by the editor (which are only implicitly enforced by the parser, if at all), a range replicator can contain one or more of the following component types:

    • Paradigm component (trial, block, list, task system)
    • Stimulus
    • Stimulus group
    • Range replicator
    • List replicator

    If I remove the list but leave the enclosed actions, the example fails to load (with a rather obscure error message) in the current nightly. This is expected, as range replicators can't contain actions unless they're enclosed in a paradigm component. I don't know what's happening in the build you're using, but it probably isn't good.

    Would it work identically if I just set the Protocol nsamples to 9 and removed both the list and range replicator?

    That wouldn't work only because you'd be resetting num_used to 0 in each iteration. However, you could get the same result by removing the range rep and setting nsamples to 9 on the list (see attached example). In fact, that probably would've been a smarter way to write it in the first place :)

    Chris

  4. 4 Posted by Mark Histed on 12 Apr, 2012 07:32 PM

    Mark Histed's Avatar

    p.s. I think it's great that the logic below is enforced by the parser.

  5. 5 Posted by Mark Histed on 12 Apr, 2012 09:00 PM

    Mark Histed's Avatar

    Ok, thanks! I have a much better idea of how the parser puts sequences
    together now.
    Mark

  6. Christopher Stawarz closed this discussion on 13 Apr, 2012 10:51 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac