1.-
N=1000; % amount samples
a1=1e4
b1=9974945
x1=1/(a1*b1)*randi([a1 b1],1,N);
x1
is a random vector uniformly distributed within (0,1)
and the max/min
ratio meets the requested roof of 997.4945
.
2.-
Check
max(x1)/min(x1)
May be a single run does no show the max/min roof of 997.4945
but the larger N
and the more runs taken the higher the probability to obtain true
max(x1)/min(x1)==997.4945
try
max(x1)/min(x1)==997.494
or
max(x1)/min(x1)==997.49
To eventually meet a max/min
roof no far from the requested 997.4945
3.-
Imposing a max/min
roof on a uniform distribution implies modfying the probability density function.
To satisfy the requested max/min
roof yet keeping the samples uniformly scattered within an interval, it means that some values that are part of the original uniform distribution have to be ignored.