Is it possible to define the specific range of a RandomReal
array for each coordinate? For example, the code
x = 1; y = 10; L = 20;
{RandomReal[x, L], RandomReal[y, L]} // Transpose
Gives me a list of 20 pairs where the first coordinate is a random real between 0 and 1, and the second is a random real between 0 and 10.
I suspect there is a neater way of writing this. Any ideas?
Transpose[{1, 10} RandomReal[1, {2, 20}]]
$\endgroup$