matlab实现对数正态分布的随机取值本人在用lognrnd欲实现对一个服从对数正态分布,均值为60

发布时间:2021-02-26 01:09:46

matlab实现对数正态分布的随机取值本人在用lognrnd欲实现对一个服从对数正态分布,均值为60.2,方差为2.9的数进行随机取样时lognrnd(60.2,2.9)(比如取10个样),运行的结果是9个为0,一个为10^17次方的数.这个结果太不合理了,小妹感激不尽!

网友回答

你输入help longnrnd后有段显示如下:
R = lognrnd(mu,sigma) returns an array of random numbers generated from the lognormal distribution with parameters mu and sigma.mu and sigma are the mean and standard deviation,respectively,of the associated normal distribution.mu and sigma can be vectors,matrices,or multidimensional arrays that have the same size,which is also the size of R.A scalar input for mu or sigma is expanded to a constant array with the same dimensions as the other input.
这段文字明确的告诉你了,
R = lognrnd (mu,sigma),返回一个随机产生的对数正态分布 .mu和sigma的均值和标准差,mu和sigma可以是 vectors,matrices,or multidimensional array,他们具有相同的大小,和产生的R是一样的.
我翻译水平有限,你自己翻译看看,体会里面的意思吧.
你说的是方差为2.9,不是标准差,
还有问题的话你自己琢磨,多看看help文件有很大的帮助
以上问题属网友观点,不代表本站立场,仅供参考!