Inverse Percentiles of a sample.

Calculates the non-exceedance probability (inverse of prctile) for xq values from sample of data x.
2.8K 次下载
更新时间 2014/9/11

查看许可证

USAGE
p = INVPRCTILE(x,xq)
p = INVPRCTILE(x,xq,dim)
p = INVPRCTILE(x,xq,dim,plot_pos)

INPUT:
x - Vector or Matrix of sample data
q - Values for non-exceedance probabilities to be computed.
q can be scalar or vector
dim - Dimension for matrix to be worked for non-exceedance probability
plot_pos - plotting positions that determine interpolation method

OUTPUT:
p - Non-exceedance probabilities values for q.

When x is a vector, p is the same size as xq, and p(i) contains the non-exceedance probability for xq(i) value.

When x is a matrix, the i-th row of p contains
the non-exceedance probability for xq(i)-values of each column of x.

For N-D arrays, INVPRCTILE operates along the first non-singleton dimension.

EXAMPLES:
x = rand(100,1);
q = [0.1 0.25 0.8];
p = invprctile(x,q);
% Check with prctile to get back the same results
qvalues = prctile(x,p)

引用格式

Durga Lal Shrestha (2024). Inverse Percentiles of a sample. (https://www.mathworks.com/matlabcentral/fileexchange/41131-inverse-percentiles-of-a-sample), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.2.0.0

1. Fixing behaviour of unique function after MATLAB R2012b

2. Possibility to use different plotting position

1.1.0.0

Bug fixing for not strictly monotonic increasing x values

1.0.0.0