MATLAB: Bounds on objective function and dependent state with FMINCON

boundsfminconMATLABmpcoptimizationsolver

I'm minimizing the function
fun = f(x)
with FMINCON. As the documentation shows, it's easy to apply bounds on x. So let's say:
min f(x)
0 <= x <= 1
But fun as well as a variable y which is dependent of x are bounded. So what I'd like to implement is:
min f(x)
0 <= x <= 1
fun_min <= fun <= fun_max
y_min <= y <= y_max
The dependency of x and y prohibits me from using y as a second optimization variable. What I'm looking for is "minimize fun = f(x) under consideration of the bounds b=[fun_min, fun_max, y_min, y_max]" Any ideas? Thanks for your help

Best Answer

Would it work to include a penalty for too-low y at the end of your function f? Something like this:
function y = f(x)
...
if y<y_min
y = y_min + 100*(y_min-y);
end
end % function f
I don't quite see why you need to enforce y_max, since fmincon will try to minimize your function anyway.