Random Sample from Discrete PDF

Inverse transform sampling to generate random sample from pdf given by domain x and p(x).

Download
Download

You are now following this Submission

Cite As

Joshua Stough (2026). Random Sample from Discrete PDF (https://in.mathworks.com/matlabcentral/fileexchange/37698-random-sample-from-discrete-pdf), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: Random Numbers from a Discrete Distribution

Categories

Find more on Read, Write, and Modify Image 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

Download