# How do I find the coordinate position of the highest point in the gap under all these curves?

5 views (last 30 days)

Show older comments

I have the below figure with 64 individual curves plotted. There is a vertical threshold over which these curves need to be. The width of the space over this threshold is shown as the DoF and is positioned by those two vertical lines, which can be anywhere the most central parts of the curves intersect with the threshhold.

My question is how do I determine the highest point of the area between the vertical lines and above the threshold but below all the curves? This might not coincide with an intersection.

The curves do not have the same domain (meaning their X values are not aligned).

The only way I can think of, which is really clunky, is to loop through x values from left to right, interrogate each curve by interpolating a point at that x value, getting the minimum of all those values, and moving to the next x. That builds a list of minimum values, and then I choose the maximum value of those minimums.

Is there are more clever way to do this? Can I do this with the plotted data? It's almost like I want to build a shape and then find the maximum y value of that shape.

Thank you for any help!

##### 1 Comment

jonas
on 25 Jul 2018

Interesting, I can imagine a few ways to go about this. Can you provide a few representative curves to work with?

Is the threshold fixed or just a minimum?

### Accepted Answer

### More Answers (1)

Fangjun Jiang
on 25 Jul 2018

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!