Q = quantile(A, p)
Q = quantile(A, n)
Q = quantile(A, p, dim)
Q = quantile(A, p, vecdim)
Q = quantile(A, p, 'all')
Q = quantile(..., 'Method', method)
quantile returns quantiles for probabilities in the interval [0,1]. If the second input is an integer greater than one, it is interpreted as the number of evenly spaced quantiles.
NaN values are omitted. Supported methods are midpoint, exact, inclusive, exclusive, and approximate.
A can be a real numeric array, a datetime array or a duration array. For datetime or duration input data, the quantiles have the same class and Format as A, and NaT values are omitted like NaN values.
A = [2 5 6 10 11 13];
Q = quantile(A, [0.25 0.5 0.75])
d = hours([1 2 3 4 10]);
Q = quantile(d, [0.25 0.5 0.75])
| Version | Description |
|---|---|
| 2.0.0 | initial version |
| 2.0.0 | datetime and duration input data supported. |