Finding threshold of matrix

Suppose u have a matrix A with rand (i.e 0-1). Now a threshold(x) of A is to be determined so that 70% of values of the given matrix A are greater than the threshold(x).

답변 (1개)

Walter Roberson
Walter Roberson 2017년 9월 16일

1 개 추천

sort() and index 3/10 of the way through.

댓글 수: 2

MSP
MSP 2017년 9월 16일
would that be faster than doing percentile
Walter Roberson
Walter Roberson 2017년 9월 16일
Yes. See the Algorithms section of https://www.mathworks.com/help/stats/prctile.html#btgyzpd-1 which describes the algorithm prctile uses.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

MSP
2017년 9월 16일

댓글:

2017년 9월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by