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!