Home > hit > auxiliary > hit_sample_intervals.m

hit_sample_intervals

PURPOSE ^

HIT_SAMPLE_INTERVALS Generate random points in a list of intervals intersected with a bounding interval.

SYNOPSIS ^

function X=hit_sample_intervals(S, Bigregion)

DESCRIPTION ^

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.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 01-Dec-2005 10:54:38 by m2html © 2003