12-07-2014 02:09 PM
I am programming a task for use in a psychology experiment. There are two options for the stimulus, the test and the catch stimuli. I want to present the test stimulus on 90% of the trials and the catch stimulus on 10% of the trials. Right now, I have the test and catch stimulus as two cases in a case structure and I have that case structure in a for loop so I can control the number of trials. I cannot figure out how to make the test stimulus run on 90% of the iterations.
Solved! Go to Solution.
12-07-2014 02:24 PM - edited 12-07-2014 02:25 PM
Ignoring any functions for randomizing data which probably exist in LV, here are a couple of options:
12-08-2014 06:34 AM
12-09-2014 12:42 PM
Where is the Riffle VI?
12-09-2014 12:45 PM
Signal Processing->Signal Operation
12-09-2014 12:46 PM
12-10-2014 04:40 AM
You can't use Riffle to riffle a boolean array after all, but you can pretend. This doesn't provide fractional True values, so if you wanted 45% True you'd actually get 50%. 😛
12-10-2014 07:30 AM - edited 12-10-2014 07:30 AM
We are making things too difficult here. Let's pull out a trick from the bag of Altenbach. Use the Bernoulli Noise VI (found in the Signal Processing->Signal Generation palette).

12-10-2014 10:21 AM
Maybe the probability of a "1" is valid for each element, but I don't think this is what the OP wanted. This example should have five Trues, no? I couldn't get it to fill it with 15 Trues, but 14 happened pretty quickly.
12-10-2014 10:52 AM
@crossrulz wrote:
We are making things too difficult here. Let's pull out a trick from the bag of Altenbach. Use the Bernoulli Noise VI (found in the Signal Processing->Signal Generation palette).
I was just about to post that... 😄