你输入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文件有很大的帮助
温馨提示:答案为网友推荐,仅供参考