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).

Respuestas (1)

Walter Roberson
Walter Roberson el 16 de Sept. de 2017

1 voto

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

2 comentarios

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

Iniciar sesión para comentar.

Categorías

Más información sobre Descriptive Statistics en Centro de ayuda y File Exchange.

Preguntada:

MSP
el 16 de Sept. de 2017

Comentada:

el 16 de Sept. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by