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

2 次查看(过去 30 天)
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?

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Probability Density Functions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by