Linear constraints using lsqnonlin
16 ビュー (過去 30 日間)
古いコメントを表示
Hi, I'm solving a non-linear system of 3 equations in 3 unkowns:

I'm using lsqnonlin to solve it:
lambda = lsqnonlin(F,lambda0,lb,ub,options);
Moreover, I need to add some constraints to the variables:

How can pass this constraints to the solver?
Thanks in advance!
2 件のコメント
Walter Roberson
2022 年 9 月 28 日
A system of 3 equations in 3 unknowns usually as a unique solution.
That is not generally the case for nonlinear systems. For example 3 curved surfaces might intersect at multiple locations and the constraints could narrow the result down to one particular quandrant.
採用された回答
Walter Roberson
2022 年 9 月 28 日
lsqnonlin() does not support constraints other than upper bound and lower bound.
I suggest you minimize the norm() of F(x,y,z)-lambda0 using fmincon() as you can supply linear inequality constraints for that.
2 件のコメント
Matt J
2022 年 9 月 30 日
Or rather minimize norm( F(x,y,z) )^2 to ensure differentiability of the objective.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Quadratic Programming and Cone Programming についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!