functionquantile

Quantile of discrete distribution (= inverse cumulative distribution function)

Extends from Modelica.Math.Distributions.Interfaces.partialTruncatedQuantile (Common interface of truncated quantile functions (= inverse cumulative distribution functions)).

Information

This function returns a number according to a uniform discrete in a band. This means the returned number is in the range:

ymin ≤ y ≤ ymax

For more details of this distribution see Wikipedia.

Inputs

TypeNameDefaultDescription
Realu (from partialQuantile)Random number in the range 0 <= u <= 1
Realy_min (from partialTruncatedQuantile)0Lower limit of y
Realy_max (from partialTruncatedQuantile)1Upper limit of y
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 partialQuantile)Random number u transformed according to the given distribution