How can I keep the highest N% values of a data set?

2 visualizaciones (últimos 30 días)
EM
EM el 12 de Sept. de 2019
Respondida: Jos (10584) el 12 de Sept. de 2019
Hi everyone,
I have a data set in one column and defined number of rows. How can I keep the top 10% of these values?

Respuesta aceptada

Jos (10584)
Jos (10584) el 12 de Sept. de 2019
Use MAXK:
Y = maxk(X, ceil(N * numel(X) / 100))

Más respuestas (0)

Categorías

Más información sobre Probability Density Functions en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by