필터 지우기
필터 지우기

How to find intersection points of two discrete curves?

조회 수: 9 (최근 30일)
Vishal Srivastava
Vishal Srivastava 2018년 3월 25일
편집: John D'Errico 2018년 3월 25일
I have two curves, one is a circle with given centre and radius, the other is [x1 x2 x3...xN; y1,y2,y3,,,yN]. The second one is a curve, and the point(s) of intersection may not be one of those points in my dataset. I want to calculate the precise point of intersection between the circle and the "interpolated" curve?
Note.: 1.) I don't want to use linspace(x1,xN,<large number>) and then check if it lies on the circle. This won't give the precise result as it may again lie between one of those discrete points. 2.) I have tried using InterX (https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=function) but it also fails in many situations.

채택된 답변

John D'Errico
John D'Errico 2018년 3월 25일
편집: John D'Errico 2018년 3월 25일
I would suggest instead Doug Schwarz's utility, intersections. It was written to be as robust as possible, and Doug is a programmer for whom I have a great deal of respect. He also spent a fair amount of effort to make it robust as I recall, and he has carefully maintained it over the years.
https://www.mathworks.com/matlabcentral/fileexchange/11837-fast-and-robust-curve-intersections
Of course, you should remember that since any such tool will only do linear interpolation, the intersection with a nonlinear curve (a circle) will be only as good as the interpolation.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by