MATLAB Answers

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

22 views (last 30 days)
EM
EM on 12 Sep 2019
Answered: Jos (10584) on 12 Sep 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?

  0 Comments

Sign in to comment.

Accepted Answer

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

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.