11 views (last 30 days)
I have the following example as illustrated in the attached figure:
points A, D and B form the green line and points C and D the orange line. The coordinates of A, B and C are known. So the slop of the green line is known. However, the exact value of orange line's slop is not known. However, there is a good starting guess for it. Now, I am looking for something that can find the coordinate of the point D for a slop closest to the initial guess. Is there a function doing that in Matlab ? Is this procedure called predictor-corrector ?
Image Analyst on 11 Sep 2020
As long as all coordinates of A, B, and C are known, then if your guess for the slope between C and D lies between the slope of CA and the slope of CB, then you can find D, exactly and analytically. It's just simple algebra. No optimization or MATLAB even needed.
If the guess is outside that range, then point D will either be on top of point A or point B, depending on which slope, AC or CB, is closest to your guessed slope.
Sounds like algebra homework so I'll let you solve it, unless your teacher said it's okay to turn in someone else's solution as your own.