Function lsqnonlin() has no optimization effect
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
It is a teaching example, but I can't get the right answer in my software. How can I solve this problem?
4 commentaires
Réponses (1)
Matt J
le 18 Mai 2020
And I have another question. My code has no optimization effect
In this case, your initial guess already is optimal. You can see this by solving for the optimum x analytically, which is possible in this case because your model is linear, and because you have no bound constraints:
a=log(PNO(:));
b=log(PO2(:));
y=log(rNO(:));
x=[ones(size(a)),a,b]\y(:)
x =
-16.8802
1.2008
0.4151
0 commentaires
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!