How to find intersection points of two discrete curves?
10 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!