Johnson system random numbers

`r = johnsrnd(quantiles,m,n)`

r = johnsrnd(quantiles)

[r,type] = johnsrnd(...)

[r,type,coefs] = johnsrnd(...)

`r = johnsrnd(quantiles,m,n)`

returns
an `m`

-by-`n`

matrix of random numbers
drawn from the distribution in the Johnson system that satisfies the
quantile specification given by `quantiles`

. `quantiles`

is
a four-element vector of quantiles for the desired distribution that
correspond to the standard normal quantiles [–1.5 –0.5
0.5 1.5]. In other words, you specify a distribution from which to
draw random values by designating quantiles that correspond to the
cumulative probabilities [0.067 0.309 0.691 0.933]. `quantiles`

may
also be a `2`

-by-`4`

matrix whose
first row contains four standard normal quantiles, and whose second
row contains the corresponding quantiles of the desired distribution.
The standard normal quantiles must be spaced evenly.

Because `r`

is a random sample, its sample
quantiles typically differ somewhat from the specified distribution
quantiles.

`r = johnsrnd(quantiles)`

returns a scalar
value.

`r = johnsrnd(quantiles,m,n,...)`

or ```
r
= johnsrnd(quantiles,[m,n,...])
```

returns an `m`

-by-`n`

-by-...
array.

`[r,type] = johnsrnd(...)`

returns the type
of the specified distribution within the Johnson system. `type`

is `'SN'`

, `'SL'`

, `'SB'`

,
or `'SU'`

. Set `m`

and `n`

to
zero to identify the distribution type without generating any random
values.

The four distribution types in the Johnson system correspond to the following transformations of a normal random variate:

`'SN'`

— Identity transformation (normal distribution)`'SL'`

— Exponential transformation (lognormal distribution)`'SB'`

— Logistic transformation (bounded)`'SU'`

— Hyperbolic sine transformation (unbounded)

`[r,type,coefs] = johnsrnd(...)`

returns
coefficients `coefs`

of the transformation that defines
the distribution. `coefs`

is ```
[gamma, eta,
epsilon, lambda]
```

. If `z`

is a standard
normal random variable and `h`

is one of the transformations
defined above, `r = lambda*h((z-gamma)/eta)+epsilon`

is
a random variate from the distribution type corresponding to `h`

.