Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mgl:taskreferenceparameters [2012/09/21 07:29]
mgl:taskreferenceparameters [2015/08/05 18:02]
Line 75: Line 75:
   task.thistrial.myVar = 15;   task.thistrial.myVar = 15;
  
-After the experiment is done that variable can be accessed through getTaskParameters just like any other parameter or randVar. Note that if you set the variable to something other than a scalar, the calculated variable will be stored as a cell array.+After the experiment is done that variable can be accessed through getTaskParameters just like any other parameter or randVar. Note that if you set the variable to something other than a scalar, the calculated variable will be stored as a cell array and you should set the default argument to {nan} instead of nan.
  
 You may also (optionally) specify all the values that your calculated variable may take on. This is useful if during any given run you won't necessarily encounter all possible values. To do this set the variable name with an underscore after it: You may also (optionally) specify all the values that your calculated variable may take on. This is useful if during any given run you won't necessarily encounter all possible values. To do this set the variable name with an underscore after it: