View Single Post
Old 12-10-2012, 05:08 AM
new_horizon new_horizon is offline
Join Date: Apr 2010
Posts: 43
Method of Limits Program

Hi All,

This is a programming questions really, opposed to a Vizard specific question.

I want to set up an experiment where I have a vehicle traveling at a choice of six speeds (ranging from 20 mph to 60 mph).

I'd like the program to pick each speed at random, but not use each speed on more than four occasions. So if 20 mph has been presented four times, I'd like the program to select one of the speeds that has not exceeded the "max trials" if you like?

Can anyone show me the best way of achieving this? I have it working but the code is very clunky and long winded.

Reply With Quote