Generate Random Variables from PDF

Generate random variables from probability density function (pdf) using inverse transform technique
171 Downloads
Updated 16 Sep 2024

View License

Generate random variables from probability density function (pdf) using inverse transform technique .
function x=PDF2Rand(xPDF,yPDF,N)
Input
xPDF:x values of probability density function
yPDF:y values of probability density function
N:Number of samples of the random varible
output
x:Generated random variable

Cite As

Ayad Al-Rumaithi (2026). Generate Random Variables from PDF (https://www.mathworks.com/matlabcentral/fileexchange/71789-generate-random-variables-from-pdf), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Random Number Generation in Help Center and MATLAB Answers
Version Published Release Notes
1.0.2

Added website

1.0.1

description

1.0.0