Add constraints to intermediate variables in the process of using least squares to minimize the objective function to fit the parameters of the equation
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
yu zhang
am 22 Sep. 2022
Bearbeitet: yu zhang
am 24 Sep. 2022
To fit the equation parameters using the least squares method, constraints need to be added to the variables during the calculation
How can I add these constraints to my function file, or create a new function file for these constraints?
0 Kommentare
Akzeptierte Antwort
Matt J
am 22 Sep. 2022
Bearbeitet: Matt J
am 22 Sep. 2022
With the constraints you mention, the problem does not fall within the scope of lsqnonlin. You will have to use fmincon, which allows you to implement any differentiable nonlinear constraints you wish.
Note however that imposing nonlinear constraints will not narrow or simplify the search for the solution, if that's what you were hoping. They will just (potentially) improve the conditioning of the result.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!