Random Number from Empirical Distribution

버전 1.0.0.0 (3.12 KB) 작성자: Durga Lal Shrestha
Generates random numbers from empirical distribution of data
다운로드 수: 5K
업데이트 날짜: 2016/4/4

라이선스 보기

EMPRAND generates random numbers from empirical distribution of data. This is useful when you do not know the distribution type (i.e. normal or uniform), but you have the data and you want to generate random numbers form that data.
The idea is to first construct cumulative distribution function (cdf) from the given data. Then generate uniform random number and interpolate from cdf.
USAGE:
[xr] = emprand(dist) generates single random number from given vector of data values dist.
[xr] = emprand(dist,m) generates m by m matrix of random numbers.
[xr] = emprand(dist,m,n) generates m by n matrix of random numbers.

Examples:
% Generate 1000 random normal numbers as data for EMPRAND
dist = randn(1000,1);
% Now generate 2000 random numbers from this data
xr = emprand(dist,2000,1);

인용 양식

Durga Lal Shrestha (2024). Random Number from Empirical Distribution (https://www.mathworks.com/matlabcentral/fileexchange/7976-random-number-from-empirical-distribution), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Random Number Generation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

BSD License
Improvement, bug fixes and simplify the code