How do I find the coordinate position of the highest point in the gap under all these curves?
2 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!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/192582/image.png)
1 Comment
More Answers (1)
Fangjun Jiang
on 25 Jul 2018
I think it is similar to this question. Regarding "shaping the minimum" and then "finding the maximum" over the plotted data, you can reference the example in the answer.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!