how can i find a value that is bigger than 95% of the values in a given vector

10 ビュー (過去 30 日間)
Dominique Gorissen
Dominique Gorissen 2017 年 11 月 24 日
回答済み: Rik 2017 年 11 月 24 日
I have a vector A=[X1; X2; X3; ...Xn] and i would like to find a value that is bigger than 95% of the components of this vector. How can i do this?

採用された回答

Star Strider
Star Strider 2017 年 11 月 24 日
Use the Statistics and Machine Learning Toolbox prctile (link) function to determine the 95th percentile.

その他の回答 (1 件)

Rik
Rik 2017 年 11 月 24 日
Sort the vector, multiply the length by 0.95 and use the rounded value as index.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by