MATLAB: How to generate log normal random number

lognormalrandom

hi, i use this code to generate 5 random number with average 8.3 and standard deviation 2.7:
mu=8.3; %mean (m)
sigma=2.7; %standard deviation (m)
d = lognrnd(mu,sigma,5,1)
But the result:
d =
8333.6
15284
73.374
256.03
1203.6
this numbers generated, but mean of this numbers Not equal to 8.3
Where did i make mistakes?

Best Answer

"mu and sigma are the mean and standard deviation, respectively, of the associated normal distribution" (emphasis added) and
"The mean m and variance v of a lognormal random variable are functions of µ and σ that can be calculated with the lognstat function."
The functions given after that second quote are not "m = mu" and "v = sigma^2".