I want to know what distribution the rand function and the randn function have. In the documentation, I read that the rand function has an equiprobable distribution, and the randn normal function. Everywhere they write differently
My task is to generate pseudo-random numbers in the range from -0.1 to 0.1, equally distributed. I don't know what matlab function I can use.
It is important to have an equiprobable distribution, not a normal one (aka Gaussian).
21 Answer
From the documentation:
So to generate a random number uniformely distributed on (-0.1, 0.1) you can use
y = rand() * 0.2 - 0.1