Theresa
2008-05-15 19:20:18 UTC
Hi everyone,
I am trying to generate a set of random numbers on the
interval [1e-7 1e-2]. I'm using rand and the formula given
in Matlab's help file:
x = a + (b-a) * rand(n)
where a = 1e-7 and b = 1e-2
I would like to generate random numbers that are uniformly
distributed across all orders of magnitude, but this method
generates random numbers that are concentrated near 1e-2,
with very few near 1e-7. Can anyone suggest a method for my
problem? Any help would be very much appreciated
Thanks
Theresa
I am trying to generate a set of random numbers on the
interval [1e-7 1e-2]. I'm using rand and the formula given
in Matlab's help file:
x = a + (b-a) * rand(n)
where a = 1e-7 and b = 1e-2
I would like to generate random numbers that are uniformly
distributed across all orders of magnitude, but this method
generates random numbers that are concentrated near 1e-2,
with very few near 1e-7. Can anyone suggest a method for my
problem? Any help would be very much appreciated
Thanks
Theresa