How to find intersection point of two curves, when the intersection point is not there in data sets?

2 Ansichten (letzte 30 Tage)
Hi,
I have two curves like as shown in the picture.
Capture1.PNG
neither of x and y coordinates of the intersection point are not there in the data sets of the two curves. But finding exact intersection point is essential for me, since Im gonna use this data in 1d looup tables where it is showing that breakpoints should increase monotonically. So, in brief the blue curve should immediately start after the intersection point, I want to exactly remove data of red and blue curves after intersection point. Is there any possibility doing that?
Thanks in advance

Akzeptierte Antwort

dpb
dpb am 14 Apr. 2019
Both intersection sections appear to be straight lines; fit them and use fzero to find the point
bblue=polyfit(xblue,yblue,1); % fit the LH section of blue curve
bred=polyfit(xbred,yred,1); % fit the red curve
x0=fzero(@(x) polyval(bblue(x)-polyval(bred(x))),xred(1)); % find intersection
NB: I typed fzero line by memory in editor; check the documentation for exact syntax if it doesn't work as written
  3 Kommentare
dpb
dpb am 14 Apr. 2019
Bearbeitet: dpb am 14 Apr. 2019
Well, fit any functional that works--for no more curvature than shown there, a quadratic would likely be very close fit (I'd guess the linear would still be quite adequate, but you can test).
What's left to explain? Use fzero to find the X where the two lines cross (their difference is zero).
Or, if you have a functional form that is generating them and not just data points, then use the two exact functionals.
You've not given us any specifics to work from for more details...the data or the functional form of the lines would be the most helpful thing to post/attach.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by