A = [1 1 1 2 3 4 8 11 12 13];
x = 2; % 0.333
r = percentrank(A,x);
fprintf("Percent rank of %d is %.4f\n",x,r)
x = 4; % 0.555
r = percentrank(A,x);
fprintf("Percent rank of %d is %.4f\n",x,r)
x = 8; % 0.666
r = percentrank(A,x);
fprintf("Percent rank of %d is %.4f\n",x,r)
x = 5; % 0.583
r = percentrank(A,x);
fprintf("Percent rank of %d is %.4f\n",x,r)
引用格式
Emmanuel (2025). percentrank (https://ww2.mathworks.cn/matlabcentral/fileexchange/182074-percentrank), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2025b
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!