Random number generator based on probability distribution
Mostra commenti meno recenti
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++
Risposte (1)
Youssef Khmou
il 7 Mar 2013
Modificato: Youssef Khmou
il 7 Mar 2013
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)
1 Commento
Dua
il 7 Mar 2013
Categorie
Mostra altro
Scopri di più su Binomial Distribution in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!