Add constraints to intermediate variables in the process of using least squares to minimize the objective function to fit the parameters of the equation

조회 수: 1 (최근 30일)
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?

채택된 답변

Matt J
Matt J 2022년 9월 22일
편집: Matt J 2022년 9월 22일
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개)

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by