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
| Type | Name | Default | Description |
|---|---|---|---|
| Real | u (from partialQuantile) | Random number in the range 0 <= u <= 1 | |
| Real | y_min (from partialTruncatedQuantile) | 0 | Lower limit of y |
| Real | y_max (from partialTruncatedQuantile) | 1 | Upper limit of y |
| 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 |