Random number generator based on probability distribution
조회 수: 4 (최근 30일)
이전 댓글 표시
1) What are the formulas for function 'random' and 'wblrnd' to generate the random numbers? assuming that I need these formula for coding in C++.
2) What are the differences between random numbers generated from function 'random' and 'wblrnd' for Weibull distribution?
3) It seems that MATLAB only supported 'random' function for Log Logistic Distribution. Is there any other formula to generate random numbers for Log Logistic Distribution? assuming that I need this formula for coding in C++
댓글 수: 0
답변 (1개)
Youssef Khmou
2013년 3월 7일
편집: Youssef Khmou
2013년 3월 7일
hi,
1)Concerning C/C++ there is function rand() in h file "math.h", but i am sure there are other statistical libraries to download, for generating Rnd variables .
2) For Mathworks try :
doc random
a=rand(N,M);
a=randn(N,M);
a=random(Name,a) where Name is :
'beta' (Beta distribution)'bino' (Binomial distribution)'chi2' (Chi-square distribution)'exp' (Exponential distribution)'ev' (Extreme value distribution)'f' (F distribution)'gam' (Gamma distribution)'gev' (Generalized extreme value distribution)'gp' (Generalized Pareto distribution)'geo' (Geometric distribution)'hyge' (Hypergeometric distribution)'logn' (Lognormal distribution)'nbin' (Negative binomial distribution)'ncf' (Noncentral F distribution)'nct' (Noncentral tdistribution)'ncx2' (Noncentral chi-square distribution)'norm' (Normal distribution)'poiss' (Poisson distribution)'rayl' (Rayleigh distribution)'t' (t distribution)'unif' (Uniform distribution)'unid' (Discrete uniform distribution)'wbl' (Weibull distribution)
참고 항목
카테고리
AI and Statistics
Statistics and Machine Learning Toolbox
Probability Distributions and Hypothesis Tests
Discrete Distributions
Binomial Distribution
AI and Statistics
Statistics and Machine Learning Toolbox
Probability Distributions and Hypothesis Tests
Discrete Distributions
Hypergeometric Distribution
AI and Statistics
Statistics and Machine Learning Toolbox
Probability Distributions and Hypothesis Tests
Continuous Distributions
Generalized Extreme Value Distribution
더 보기
Help Center 및 File Exchange에서 Binomial Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!