Differences

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

Link to this comparison view

mgl:taskreferencesegmenttimes [2013/10/08 21:46]
mgl:taskreferencesegmenttimes [2013/10/08 21:58]
Line 25: Line 25:
   task.segmax = [1.3 nan];   task.segmax = [1.3 nan];
   task.segdur{2} = [2:​0.1:​2.5];​   task.segdur{2} = [2:​0.1:​2.5];​
 +
 +Or, if you want different durations with different probabilities (the above would make each of the segment durations equally likely):
 +
 +  task.segmin = [1.3 nan];
 +  task.segmax = [1.3 nan];
 +  task.segdur{2} = [1 2 8];
 +  task.segprob{2} = [0.8 0.1 0.1];
 +
 +This would make the second segment have durations of either 1 2 or 8 seconds with the 1 second one having a probability of 0.8 and the others having 0.1 probability. You can also specify multiple segments to have different durations like:
 +
 +  task.segmin = [1.3 nan nan];
 +  task.segmax = [1.3 nan nan];
 +  task.segdur{2} = [2:​0.1:​2.5];​
 +  task.segdur{3} = [1 2 8];
 +  task.segprob{3} = [0.8 0.1 0.1];
 +
 +This would make segment 2 and segment 3 behave as in the above two examples.
  
 You can also have a segment wait until a backtick happens, so that you can easily synch to volumes, for example: You can also have a segment wait until a backtick happens, so that you can easily synch to volumes, for example: