What starting point to choose so fsolve always returns a solution when any exists?
Ältere Kommentare anzeigen
Hello
I want to check if a circle/sphere has any intersection point with a curve/surface.
I did some experiment on this, but on some starting point it doesn't find solution, while it finds on others.
Can I choose such a starting point so that fsolve will always find a solution if there is any? Maybe the center of the circle/sphere?
2 Kommentare
Dimitris Kalogiros
am 4 Okt. 2019
Are you sure that you are a matlab user ?
Richárd Tóth
am 4 Okt. 2019
Akzeptierte Antwort
Weitere Antworten (2)
Can I choose such a starting point so that fsolve will always find a solution if there is any? Maybe the center of the circle/sphere?
There is no way to choose the starting point in a way that is independent of the surface. It is the shape of your surface that will determine where the local minima (which you wish to avoid) lie.
Bjorn Gustavsson
am 4 Okt. 2019
1 Stimme
This depends on how you have parameterized your surface. For the most general case (curve - circle), where you have a curve parameterized as:
and you want to know if it intersects a circle
, this is difficult, if you don't have a simple way of determining t for a point on the curve, or determining how far a point is from the curve.
and you want to know if it intersects a circle Looking at this from the most tricky angle given the information you've presented any arbitrarily selected starting-point on the curve might have a large number of very steep local minima in the distance to the nearest point on the circle, so any distance minimization algorithm might have convergence conditions making it give up a search.
If you give more information about the character of the curve/surface answer might change to more useful.
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!