Percentiles

13 ビュー (過去 30 日間)
Colin
Colin 2012 年 6 月 11 日
編集済み: David Ebert 2022 年 4 月 3 日
Is there a function that returns the percentile, p, for a given value, x, in array, A?
As opposed to prtcile(A,p) which returns x for array A and percentile p.
The equivalent Excel function is PERCENTRANK.
Thanks

回答 (1 件)

Colin
Colin 2012 年 6 月 11 日
I found this via google search...
A function to calculate the percent rank of each element of a matrix is not available in MATLAB (as at end June 2009).
To work around this issue, use the function TIEDRANK from the Statistics Toolbox and normalize by dividing by the length of the input vector. This converts the result to percentiles.
eg. x = rand(1,40); tiedrank(x)/length(x);
  1 件のコメント
David Ebert
David Ebert 2022 年 4 月 3 日
編集済み: David Ebert 2022 年 4 月 3 日
Thanks, appreciate it, was looking for a similar function.

サインインしてコメントする。

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by