Generates a log-normal distributed random number. In order to reset the generator seed use the command randreset.
out = lognrnd (mean,stddev);
Generates a lognormal distributed random number with user defined mean value and standard deviation.
This example shows how to create an histogram of a log-normal distribution.
n = 1000;
y = matrix(n);
mean_val = 1;
std_dev = 0.25;
y(i) = lognrnd(mean_val, std_dev);
The histogram will look similar to the following one.