# lognormal (Scripts) 1.0

Average Rating
User Rating:
Visitors Rating:
My rating:

• Last update: 5 years ago
• Operating system: Linux, Mac OS X, Win All, BSD, Solaris
• Publisher: Walther
See full specifications

## lognormal (Scripts) Publisher's description

### lognormal: creates lognormal distribution with desired mode (peak-value)

lognormal: creates lognormal distribution with desired mode (peak-value)

usage: lognormal(mode_log,sigma_n,n,plotit)

--- INPUT arguments:
'mode_log' ---> can be any positive value (is the most frequent value of the lognormal distribution -> the peak in the histogram)
'sigma_n' ---> standard deviation of the corresponding normal distribution
--> CAUTION: it is not the standard deviation of the lognormal distribution, because it is a somewhat unuseful value for an asymmetric distribution
'n' ---> number of n-values the distribution should have
'plotit' ---> plot switch (0=no,1=yes)

How it works:
1.) calculate the mean(normal) from the input mode_log (lognormal) and sigma_n (normal) with mu_n = log(mode_log) + sig_n^2
2.) create random normal distrubution r with n-values
3.) shift and transform the normal distribution with dist_n = mu_n + sig_n * r
4.) transform the normal distribution to lognormal with dist_log = exp(dist_n)
5.) calculate the output mode of the lognormal distribution with mode_out = exp(mean(dist_n)-std(dist_n)^2)

--- OUTPUT arguments:
'output' struct with several fields:

'dist_n' ---> created normal distribution
'mu_n_in' ---> input mean value for the normal distribution calculated from input 'mode_log' and 'sigma'
'mu_n_out' ---> output mean value of the normal distribution
'sig_n_in' ---> input standard deviation ('sigma') of the normal distribution
'sig_n_out' ---> output standard deviation of the normal distribution
'dist_log' ---> created lognormal distribution
'mode_log_in' ---> input mode of the lognormal distribution
'mode_log_out' ---> output mode of the lognormal distribution calculated from mean and standard deviation of the normal distribution 'dist_n'
'mu_log' ---> output mean value of the lognormal distribution
'sig_log' ---> output standard deviation of the lognormal distribution

--- Example usage:
output = lognormal(1-e4,1,1e5,1)
- will create a lognormal distribution with mode 0.0001
- the corresponding normal distribution will have a standard deviation of 1
- 10'000 values will be created
- both distributions will be plotted

#### System Requirements:

MATLAB 7.9 (2009b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

#### lognormal (Scripts) Tags:

Click on a tag to find related softwares

## Most Popular

ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation