histogram_pdf_2d_sample_test, a MATLAB program which calls histogram_pdf_2d_sample() to demonstrate how uniform sampling of a 2D region with respect to some known Probability Density Function (PDF) can be approximated by decomposing the region into rectangles, approximating the PDF by a piecewise constant function, constructing a histogram for the CDF, and then sampling.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
histogram_pdf_2d_sample, a MATLAB library which demonstrates how uniform sampling of a 2D region with respect to some known Probability Density Function (PDF) can be approximated by decomposing the region into rectangles, approximating the PDF by a piecewise constant function, constructing a histogram for the CDF, and then sampling.