Drawing randomly from a set of logarithmically spaced values

Hi Mark,

The protocol in the attached experiment performs 10 trials. In each trial, the variable var is assigned a random element from a set of values equivalent to that returned by the MATLAB code logspace(0,1,10). Each element is used only once, so all the values are used.

The values of var are generated using a combination of a range replicator and a variable assignment expression. The range replicator increments the variable index from 0 to 9 in steps of 1. Within the replicator body, var is set to the expression pow(10, index/9.0). Randomization is achieved by setting the selection scheme of the block to “random without replacement”.

Hopefully, this is close to what you need. If not, please let me know!

Chris

Attachment: logspace_random.xml (1.32 KB)

Thanks, Chris!