Why is the "prctile" function returning the same output for different input?
5 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2017 年 1 月 19 日
編集済み: MathWorks Support Team
2022 年 5 月 13 日
I have a vector of data called "var", and I noticed that the two function calls to "prctile":
prctile(var(1 : end), 0.008)
and
prctile(var(1 : end), 0.016)
return the same result. Is this an error or bug?
採用された回答
MathWorks Support Team
2022 年 5 月 13 日
編集済み: MathWorks Support Team
2022 年 5 月 13 日
This is intended behavior.
For percentile values outside the range of data, "prctile" will output the minimum or maximum of the data as appropriate. In this case the "prctile" function was returning the minimum value in the data both times, because both .008 and .016 are outside the minimum percentile.
For more information about the algorithms involved in the "prctile" function, please view the following documentation, under the "Algorithms" section:
0 件のコメント
その他の回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!