Linear constraints using lsqnonlin

6 visualizaciones (últimos 30 días)
Luca Vergani
Luca Vergani el 28 de Sept. de 2022
Comentada: Matt J el 30 de Sept. de 2022
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 comentarios
Torsten
Torsten el 28 de Sept. de 2022
Editada: Torsten el 28 de Sept. de 2022
A system of 3 equations in 3 unknowns usually has a unique solution.
So how can you put constraints on the solution ?
Do you want the 3 nonlinear equations only approximately to be satisfied ?
Walter Roberson
Walter Roberson el 28 de Sept. de 2022
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.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de Sept. de 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.
  2 comentarios
Luca Vergani
Luca Vergani el 30 de Sept. de 2022
Thanks a lot
Matt J
Matt J el 30 de Sept. de 2022
Or rather minimize norm( F(x,y,z) )^2 to ensure differentiability of the objective.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Systems of Nonlinear Equations en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by