Sampling from a discrete distribution

The function is to draw samples from an arbitrary discrete distribution.

Download
Download

You are now following this Submission

Cite As

Dahua Lin (2026). Sampling from a discrete distribution (https://ch.mathworks.com/matlabcentral/fileexchange/21912-sampling-from-a-discrete-distribution), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0

Fixing a bug that may lead to incorrect sampling.

Download
1.0.0

Download