MATLAB: How to minimize a nonlinear function f(x,y,z) over y and z subject to the constraint that y<=x ? Is it possible to get a minimum that depends on x

fmincon

How to minimize a nonlinear function f(x,y,z) over y and z subject to the constraint that y<=x ? Is it possible to get a minimum that depends on x ?

Best Answer

xyz0 = sort(rand(1,3),'descend'); %starting point
A = [-1 1 0]; b = 0;
fmincon( @(xyz) f(xyz(1), xyz(2), xyz(3)), xyz0, A, b )