MATLAB: Constraint on some of the design variables

constrained optimizationMATLABnonlinear constraints

Hi all,
If I have an objective function as
obj(x,y,z) with lower bounds [x_l,y_l,z_l] and upper bounds [x_u,y_u,z_u]
and a non-linear constraint applied only to y & z: nlincon(y,z) , which is a scalar valued function.
How do I implement this optimization problem in matlab?
Thanks

Best Answer

Sounds like a standard fmincon(). Your input variables would be the vector [x, y, z] and inside your nonlinear constraint function you would just ignore the portion of the input that corresponds to x.