Hi, my line1 (x1, y1) and line2 (x2, y2) are plotted using a series of points. And I don't know the exact experssion for these two lines. Now I try to use plotxploy() to find the intersection points between these two lines. And the output is obviously incorrect.
This is my plots, and it is obviously there are two intersection points, one is around (x=3.5, y=0), the other belongs to (x=[4.5-5], y=0.0032)
My code is:
[x,y] = polyxpoly(x1, y1, x2, y2)
And the output for x and y are shown below.
The first intersection point is correct, but the second one is incorrect. Why this happens?
I would be very appreciated if anyone could give me some help! I also attach my original dataset for line1 and line2 for your reference.
x1 = x2:
y1:
y2: