Impose the convergence of two segments so that they intersect

2 views (last 30 days)
Hi,
i have two vectors each consisting of 4 known points. I made a spline interpolation to plot the curves. The curves obtained are traits with little curvature (almost straight lines) due to known points that define them. The two lines do not intersect because they are only two segments. Now I would like to extrapolate points outside the range in which they are defined to find the point of intersection, and then merge the two lines making a B-Spline on three points (the last point of the two segments and the point of intersection).But i would require that the point of intersection is in a certain range of x/y.
The problem is that the initial segments are not always the same and, depending on the value of the points and the type of interpolation and extrapolation (linear, spline, etc ...), some times the point of intersection is found in a location useful for my purpose, other times outside the range of interest. (For some segments spline is good, for other segments linear is good!)
Can anyone suggest how I can do in order to join the two segments in the correct way (ie make sure that the two lines intersect at a "useful" point)?
(Perhaps imposing some condition on the interpolation of the points? or on extrapolation so that the two lines converge? But how could i do it?)
Sorry i know that i'm not very clear but is not very simple to explain the situation!! Thanks!!!

Answers (0)

Community Treasure Hunt

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

Start Hunting!