prctile
prctile(X,p) returns the p percentile of the vector or matrix X, where p ∈ [0,100]. The linear interpolation between closest ranks method is used.
Examples
>> prctile([15, 20, 35, 40, 50], 30)#% calculate the 30th percentile
20 >> prctile([15, 20, 35, 40, 50], 50)# 35