Generate Random Variables from PDF

Generate random variables from probability density function (pdf) using inverse transform technique
159 Downloads
Updated 8 Jun 2019

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

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.1

description

1.0.0