0

Demo data

Data set can be found here : Dataset Each point (x;y) indicated the value (y) of the xth sample measured

I am trying to bound a data region which has the most data points just like in the figure , by using 2 line y=a and y=b How can i approach this solution

Totally New
  • 147
  • 5

1 Answers1

0

Let's say your minimum and maximum for y values are respectively 960 and 972:

y(y < 960) = 960;
y(y > 972) = 972;

Alternatively, you can remove those outliers instead of bounding them:

y_idx = find((y < 960) | (y > 972));
x(y_idx) = [];
y(y_idx) = [];
Tommaso Belluzzo
  • 23,232
  • 8
  • 74
  • 98
  • There are various extreme high peaks / low peaks in the data.If using this method , all datas that are min will be loss? – Totally New Nov 22 '17 at 08:24
  • With the first method, the data is not lost, only modified to stay above your minimum and below your maximum. With the second approach you remove the peak observations. – Tommaso Belluzzo Nov 22 '17 at 08:33