Random number generation from an arbitrary log-concave generalized pdf

Version 1.0.0.0 (7.77 KB) by Leonid
Generate random numbers from arbitrary log-concave generalized pdf, known up to a constant
1.3K Downloads
Updated 23 Oct 2007

View License

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
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Random Number Generation in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
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.