資源簡介
該文件中包含了多種隨機數的產生,其中的zipf分布是自己所寫,很不錯的一個m文件。
代碼片段和文件信息
function?varargout?=?randraw(distribName?distribParams?varargin)
%
%???EFFICIENT?RANDOM?VARIATES?GENERATOR
%?
%?See?alphabetical?list?of?the?supported?distributions?below?(over?50?distributions)
%?
%?1)??randraw?
%???????????presents?general?help.
%?2)??randraw(?distribName?)?
%???????????presents?help?for?the?specific?distribution?defined?
%???????????by?usage?string?distribName?(see?table?below).
%?3)??Y?=?randraw(?distribName?distribParams?sampleSize?);
%???????????returns?array?Y?of?size?=?sampleSize?of?random?variates?from?distribName??
%???????????distribution?with?parameters?distribParams
%
%???????????????ALPHABETICAL?LIST?OF?THE?SUPPORTED?DISTRIBUTIONS:
%??____________________________________________________________________
%?|??????DISTRIBUTION?NAME????????????????????|???USAGE?STRING?????????|
%?|___________________________________________|________________________|
%?|????????Alpha??????????????????????????????|????‘alpha‘?????????????|
%?|????????Anglit?????????????????????????????|????‘anglit‘????????????|
%?|????????Antilognormal??????????????????????|????‘lognorm‘???????????|
%?|????????Arcsin?????????????????????????????|????‘arcsin‘????????????|
%?|????????Bernoulli??????????????????????????|????‘bern‘??????????????|
%?|????????Bessel?????????????????????????????|????‘bessel‘????????????|
%?|????????Beta???????????????????????????????|????‘beta‘??????????????|
%?|????????Binomial???????????????????????????|????‘binom‘?????????????|
%?|????????Bradford???????????????????????????|????‘bradford‘??????????|
%?|????????Burr???????????????????????????????|????‘burr‘??????????????|
%?|????????Cauchy?????????????????????????????|????‘cauchy‘????????????|
%?|????????Chi????????????????????????????????|????‘chi‘???????????????|
%?|????????Chi-Square?(Non-Central)???????????|????‘chisqnc‘???????????|
%?|????????Chi-Square?(Central)???????????????|????‘chisq‘?????????????|
%?|????????Cobb-Douglas???????????????????????|????‘lognorm‘???????????|
%?|????????Cosine?????????????????????????????|????‘cosine‘????????????|
%?|????????Double-Exponential?????????????????|????‘laplace‘???????????|
%?|????????Erlang?????????????????????????????|????‘erlang‘????????????|
%?|????????Exponential????????????????????????|????‘exp‘???????????????|
%?|????????Extreme-Value??????????????????????|????‘extrval‘???????????|
%?|????????F?(Central)????????????????????????|????‘f‘?????????????????|
%?|????????F?(Non-Central)????????????????????|????‘fnc‘???????????????|
%?|????????Fisher-Tippett?????????????????????|????‘extrval‘???????????|
%?|????????Fisk???????????????????????????????|????‘fisk‘??????????????|
%?|????????Frechet????????????????????????????|????‘frechet‘???????????|
%?|????????Furry??????????????????????????????|????‘furry‘?????????????|
%?|????????Gamma??????????????????????????????|????‘gamma‘?????????????|
%?|????????Generalized?Inverse?Gaussian???????|????‘gig‘???????????????|
%?|????????Gener
- 上一篇:渦旋光束干涉圖樣計算程序
- 下一篇:決策樹id3 matlab源碼
評論
共有 條評論