


HIT_SAMPLE_INTERVALS Generate random points in a list of intervals intersected with a bounding interval.
-------------------------------------------------------------------------
DESCRIPTION
-------------------------------------------------------------------------
X=hit_sample_intervals(S, Bigregion)
Example: X=sample_intervals...
({{[1,2],20},{[-2,0],500}},Bigregion)
-------------------------------------------------------------------------
INPUT
-------------------------------------------------------------------------
S{i} is a cell {int,np}
int: [a,b] i-th interval.
np: number of points to be extracted in the i-th rectangle (intersected
with Bigregion).
Bigregion: bounding interval.
-------------------------------------------------------------------------
OUTPUT
-------------------------------------------------------------------------
X(i) i-th sampled point.
-------------------------------------------------------------------------
COMMENTS
-------------------------------------------------------------------------
This function does not work if the bounding interval and *some* interval
have an empty intersection.