How to find intersection point of two curves, when the intersection point is not there in data sets?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I have two curves like as shown in the picture.

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
0 commentaires
Réponse acceptée
dpb
le 14 Avr 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 commentaires
dpb
le 14 Avr 2019
Modifié(e) : dpb
le 14 Avr 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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!