Random number generation from an arbitrary log-concave generalized pdf

Generate random numbers from arbitrary log-concave generalized pdf, known up to a constant

You are now following this Submission

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 (2026). 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 .

Categories

Find more on Random Number Generation in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
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.