functiondensity

Density of discrete distribution (undefined!)

Extends from Modelica.Math.Distributions.Interfaces.partialDensity (Common interface of probability density functions).

Information

This function returns the probability density according to a discrete distribution.

For more details of this distribution see Wikipedia.

Inputs

TypeNameDefaultDescription
Realu (from partialDensity)Random number over the real axis (-inf < u < inf)
Real[:]x{0, 1}Discrete values to be chosen from
Real[size(x, 1)]pones(size(x, 1))/size(x, 1)The probabilities of the discrete values

Outputs

TypeNameDefaultDescription
Realy (from partialDensity)Density of u