I need to simulate a Gaussian Channel in C. How do I do that? Where can I get code snippets for this?
IIRC, approximating Gaussian distribution is easy - but slow if you want a good approximation. Just add several independent random numbers to get each output. The more "inputs" per output, the better the approximation.
Definitely works if the "inputs" have uniform distribution. I seem to remember reading that it works for almost any input distribution, but you may need far more inputs per output to get a good approximation.
This is Gaussian white noise - the outputs are independent (all frequencies have same amplitude). There's also a similar pink noise algorithm. Still Gaussian distribution, but higher frequencies have lower amplitudes (the outputs aren't independent). Each ouput is still a sum of a fixed set of independent "input" random numbers, but only first is replaced for every output. The second is replaced for every other output, the third for every fourth output, the fourth for every eighth output etc. For most outputs, precisely two input random numbers are replaced - every 2^n outputs you only replace the first.