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

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

Jos (10584)
Jos (10584) il 12 Set 2019
Use MAXK:
Y = maxk(X, ceil(N * numel(X) / 100))

Più risposte (0)

Categorie

Scopri di più su Workspace Variables and MAT-Files in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by