MATLAB Answers

compare two (x,y) plots or vectors optimally

2 views (last 30 days)
MatG
MatG on 3 Sep 2020
Commented: Rik on 3 Sep 2020
Question: What's a good and fast way to find out whether an (x,y) curve (gray in the figure) is above or below another (X,Y) curve, let's call it a "bound", (shown as red/purple, green, and orange in the figure)? The values of elements of x and X vectors are not the same though the span of X (the bound) cntains x (the curve). More details below.
Background: I have about 5000 (x,y) curves, similar to the gray curve in the figure, and per each gray curve, I have 4 possible bounds shown in orange, red, purple, and green in the figure. The set of 4 bounds are saved in files and there are aboout 800 such files. I'll create the 5000 (x,y) curves and compare each with a one of the files containing the 4 bound curves according to some logic. I'd like to see whether a curve has a point higher than the bounds or it's contained by the bound from above. The values of curve and bounds values on horizontal axis are not the same (x and X vector elements are different) though the span of X (the bound) contains x (the curve)

  1 Comment

Rik
Rik on 3 Sep 2020
Can you show what you mean with example data?

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!