Random number generation from an arbitrary log-concave generalized pdf
Program "rand_log_concave.m" generates random numbers from an arbitrary log-concave generalized pdf (i.e., a pdf known up to its normalization constant). The log of the pdf must be concave. In particular, the program can be used to generate random numbers efficiently from truncated log-concave pdfs, such as truncated normal, beta, gamma, etc. For algorithm description and details, please see the comments given in *.m file. The tests of the program are included.
Cite As
Leonid (2024). Random number generation from an arbitrary log-concave generalized pdf (https://www.mathworks.com/matlabcentral/fileexchange/15610-random-number-generation-from-an-arbitrary-log-concave-generalized-pdf), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | A simple but important improvement to the main code "rand_log_concave.m", which allows to avoid many potentially costly calculations of the log-likelihood during the rejection sampling of random numbers. |