Matlab predictor-corrector

3 次查看(过去 30 天)
Mary
Mary 2020-9-10
Hi,
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 ?
Regards,
Mary
  1 个评论
Image Analyst
Image Analyst 2020-9-11
Hi,
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 slope of the green line is known. However, the exact value of orange line's slope 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 slope closest to the initial guess. Is there a function doing that in Matlab? Is this procedure called predictor-corrector?

请先登录,再进行评论。

回答(1 个)

Image Analyst
Image Analyst 2020-9-11
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.
  2 个评论
Mary
Mary 2020-9-11
the guess is within a known range, we agree. But the question is how to do a minimum deviatation from the initial guess to find the solution. There are plenty of solutions but the one closest to the intial guess must to be picked.
And I am not looking for someone else's solution. Actually the problem is more complicated than that and I tried to make an analogy with what you call simple algebra.
Image Analyst
Image Analyst 2020-9-11
Why are there plenty of solutions? In your example, if the slope between CA is -0.8, and the slope between C and B is 1.5, and your guess is a slope of 1000, then there is only one place where you could get a slope of 1000, and so you could get the exact location of D. To the left of C, you can get slopes anywhere from -0.8 to -infinity, and on the right anywhere from 1.5 to + infinity. There would be only one point where you'd get a slope with a value of +1000.
Please show a diagram with plenty of CD lines all showing the same guessed slope.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by