### Translated by

이 페이지의 내용은 영어에서 자동 번역되었습니다. 자동 번역 기능을 해제하려면 "<a class="turn_off_mt" href="#">여기</a>"를 클릭하십시오.

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

on 14 Apr 2019
Latest activity Edited by dpb

on 14 Apr 2019

### dpb (view profile)

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?

R2017b

### dpb (view profile)

on 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

on 14 Apr 2019
Hi,
The red curve is actually semicircle and blue curve is some cuve with an average slope of 135 degrees, but its not a straight line.

on 14 Apr 2019
Hi,
Can you please explain in bit more detail?
Thank you.
dpb

### dpb (view profile)

on 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.