MATLAB: Random numbers -1 +1 with 2 decimals without any distribution

random

Dear all, How can I generate random numbers ranging between -1 to +1 with 2 decimals and without any kind of distribution? Thanks in advance, Diego

Best Answer

With difficulty.
The -1 to +1 with 2 decimal places is not a problem (to the extent that binary floating point allows representation of 2 decimal places).
The "without any kind of distribution" is a problem. Practically everything has some kind of distribution, even if it is only Uniform Random Distribution. You will get a (researched) distribution if you were to monitor keystroke reaction times; you would get a different distribution (which would not be Uniform Random) if you asked people to enter numbers from 1 to 200.
You can get "cryptographically secure" pseudo-random generators, but those are designed to imitate Uniform Random Distribution.
You have 201 different outcomes, which is divisible by 3 (and not a prime), which interferes with using approaches such as ring theory. Besides, those approaches are for Uniform Random distribution.
Are you sure you cannot accept Uniform Random?
(randi(201) - 101) ./ 100