Clear Filters
Clear Filters

Find range of values where 80% lies

2 views (last 30 days)
Somto Dibiaezue
Somto Dibiaezue on 4 May 2018
Commented: Somto Dibiaezue on 11 May 2018
Hi,
I've got gradually changing data set in an array, and I'm trying to find the threshold where 80% of the data lies below and hopefully get the corresponding indices. A Gaussian distribution takes it about the mean but using this will also most definitely remove the "good" data.
The picture shows an example were I'm trying to eliminate data < 1.35(red x-axis). There seems to be loads of other distributions but the information is overwhelming. Would be helpful if someone can point in the right direction.
Thanks.
  3 Comments
jonas
jonas on 4 May 2018
Edited: jonas on 4 May 2018
Perhaps I'm misunderstanding the issue. Why don't you just find the 20th percentile and remove all values below that?
th=prctile(xdata,20)
xdata(xdata<th)=[];
ydata(xdata<th)=[];

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!