functionquantile
Quantile of discrete distribution (= inverse cumulative distribution function)
Extends from Modelica.Math.Distributions.Interfaces.partialQuantile (Common interface of quantile functions (= inverse cumulative distribution functions)).
Information
This function returns a number according to a discrete distribution.
For more details of this distribution see Wikipedia.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | u (from partialQuantile) | Random number in the range 0 <= u <= 1 | |
| Real[:] | x | {0, 1} | Discrete values to be chosen from |
| Real[size(x, 1)] | p | ones(size(x, 1))/size(x, 1) | The probabilities of the discrete values |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | y (from partialQuantile) | Random number u transformed according to the given distribution |