how can i find a value that is bigger than 95% of the values in a given vector
10 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Star Strider
2017-11-24
Use the Statistics and Machine Learning Toolbox prctile (link) function to determine the 95th percentile.
0 个评论
更多回答(1 个)
Rik
2017-11-24
Sort the vector, multiply the length by 0.95 and use the rounded value as index.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!