Drawing delay intervals from a gamma distribution

Hello all,

I've tried to google this quickly but can't seem to find a simple answer to it. I would like to have my arduino blink an led or play a tone with a varying delay. This is basically to model the firing of a neuron. However, I don't want to pick the delays from a random distribution, but rather from a gamma distribution for which we've calculated the proper parameters. In Matlab for example, I would use function gamrnd to draw numbers from such a distribution and then pause for that duration. Is this doable in Arduino?

Thanks a ton, FB

Very doable. Google "random number gamma distribution" for some helpful ideas.

yes of course it is possible, e.g. check - https://github.com/lh3/samtools/blob/master/bcftools/kfunc.c -