error in prctile function?
Show older comments
I'm creating my own percentile function and wanted to compare it to the prctile function available in MATLAB.
I am pretty sure I am doing things right but I am getting different values than prctile.
data = [1 2 3 4 5];
p = 0:100;
y1 = prctile(data,p);
y2 = my_function(data,p);
My values are linear (1,1.04,1.08,etc.) as one might expect but the values from MATLAB's prctile are not. What gives?
Accepted Answer
More Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!