I started to make a code to randomly distribute points evenly in a circle, however, when generating a point located with a random theta angle between 0 and 2π and with a distance from the center of the random circle of 0 to the radius R, the points are huddled closer to the center.
I made the following code:
Pontos = R * rand(1,N) .* exp(j * 2 * pi * rand(1,N));
where rand (1, N) is a vector that relates to N random values from 0 to 1. At the moment when I draw the square root of the first rand operation (1, N), when plotting the graphs, the points are evenly distributed:
Pontos = R * sqrt(rand(1,N)) .* exp(j * 2 * pi * rand(1,N));
How can this be explained?