MATLAB: Nonlinear system of equations with constrains

nonlinear equations constraints

Hi every body,
I have 4 nonlinear equations and 4 unknowns to be solved. but my unknowns are constrained. So I can't use something like fsolve. Which function do I need to use? I also have optimization toolbox. Is 'fgoalattain' my answer?(I've tried it but not familiar how it works:( )
thanx

Best Answer

If the constraints are simple upper and lower bounds, you can use lsqnonlin(). Otherwise, you could use fmincon().