Constraining equilibrium solver to positive values (fsolve, lsqnonlin)
Afficher commentaires plus anciens
From my understanding, it's impossible to constrain fsolve to only find positive zeros but that it is possible using lsqnonlin (see this thread: http://www.mathworks.com/matlabcentral/newsreader/view_thread/280353). I see how I can use bound constraints with lsqnonlin to only return positive values, but how do I "minimize the residuals to 0"? Thank you!
Réponse acceptée
Plus de réponses (1)
John D'Errico
le 17 Mai 2011
0 votes
There is NO assurance that you can minimize the residuals to zero. What is the root of y=x^2+1, with x restricted to real values?
Just wanting to solve a problem does not mean there will be a solution.
Catégories
En savoir plus sur Choose a Solver dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!