Linear constraints using lsqnonlin
6 views (last 30 days)
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!
Walter Roberson on 28 Sep 2022
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.