Rate this file
9 Downloads (last 30 days)
File Size: 2.81 KB
File ID: #41131
Inverse Percentiles of a sample.
04 Apr 2013
(Updated 05 Apr 2013)
Calculates the non-exceedance probability (inverse of prctile) for xq values from sample of data x.
Watch this File
p = INVPRCTILE(x,xq)
p = INVPRCTILE(x,xq,dim)
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
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.
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)
MATLAB 8.0 (R2012b)
|Comments and Ratings (1)
|09 Sep 2013
|05 Apr 2013
Bug fixing for not strictly monotonic increasing x values