gpt4 book ai didi

matlab - 具有用户定义分布函数的随机数 (MATLAB)

转载 作者:行者123 更新时间:2023-12-03 03:53:43 28 4
gpt4 key购买 nike

有没有一种方法可以获得满足用户确定的分布函数的随机数生成。在 MATLAB 中,我发现了仅具有均匀分布函数和正态分布函数的随机数生成器。

最佳答案

Statistics Toolbox具有大量具有预定义分布的随机数生成器。希望您需要的内容包含在列表中:

Random Number Generators.

betarnd - Beta random numbers.
binornd - Binomial random numbers.
chi2rnd - Chi square random numbers.
evrnd - Extreme value random numbers.
exprnd - Exponential random numbers.
frnd - F random numbers.
gamrnd - Gamma random numbers.
geornd - Geometric random numbers.
gevrnd - Generalized extreme value random numbers.
gprnd - Generalized Pareto inverse random numbers.
hygernd - Hypergeometric random numbers.
iwishrnd - Inverse Wishart random matrix.
johnsrnd - Random numbers from the Johnson system of distributions.
lognrnd - Lognormal random numbers.
mhsample - Metropolis-Hastings algorithm.
mnrnd - Multinomial random vectors.
mvnrnd - Multivariate normal random vectors.
mvtrnd - Multivariate t random vectors.
nbinrnd - Negative binomial random numbers.
ncfrnd - Noncentral F random numbers.
nctrnd - Noncentral t random numbers.
ncx2rnd - Noncentral Chi-square random numbers.
normrnd - Normal (Gaussian) random numbers.
pearsrnd - Random numbers from the Pearson system of distributions.
poissrnd - Poisson random numbers.
randg - Gamma random numbers (unit scale).
random - Random numbers from specified distribution.
randsample - Random sample from finite population.
raylrnd - Rayleigh random numbers.
slicesample - Slice sampling method.
trnd - T random numbers.
unidrnd - Discrete uniform random numbers.
unifrnd - Uniform random numbers.
wblrnd - Weibull random numbers.
wishrnd - Wishart random matrix.

您还可以使用 random ,它基本上根据发行版的名称调用上述函数之一:

RANDOM Generate random arrays from a specified distribution.

R = RANDOM(NAME,A) returns an array of random numbers chosen from the
one-parameter probability distribution specified by NAME with parameter
values A.

[...]

NAME can be:

'beta' or 'Beta',
'bino' or 'Binomial',
'chi2' or 'Chisquare',
'exp' or 'Exponential',
'ev' or 'Extreme Value',
'f' or 'F',
'gam' or 'Gamma',
'gev' or 'Generalized Extreme Value',
'gp' or 'Generalized Pareto',
'geo' or 'Geometric',
'hyge' or 'Hypergeometric',
'logn' or 'Lognormal',
'nbin' or 'Negative Binomial',
'ncf' or 'Noncentral F',
'nct' or 'Noncentral t',
'ncx2' or 'Noncentral Chi-square',
'norm' or 'Normal',
'poiss' or 'Poisson',
'rayl' or 'Rayleigh',
't' or 'T',
'unif' or 'Uniform',
'unid' or 'Discrete Uniform',
'wbl' or 'Weibull'.

关于matlab - 具有用户定义分布函数的随机数 (MATLAB),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24652166/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com