hull is used to create the convex hull of a set of constraints.
Define two polytopes
F1 = [-1 <= x <= 1, -1 <= y <= 1];
F2 = [-1.5 <= x-y <= 1.5, -1.5 <= x+y <= 1.5];
Plot the polytopes
Create a model of the convex hull
| ID| Constraint| Type|
| #1| Numeric value| Element-wise 2x1|
| #2| Numeric value| Element-wise 2x1|
| #3| Numeric value| Element-wise 2x1|
| #4| Numeric value| Element-wise 2x1|
| #5| Numeric value| Equality constraint 2x1|
| #6| Numeric value| Equality constraint 1x1|
| #7| Numeric value| Element-wise 2x1|
Important to realize is that the representation will introduce new variables due to a lifting procedure. Nevertheless, YALMIP will realize that these are auxiliary variables defined internally, so when you plot the hull, the projection to the original user-defined variables will be plotted.
The command applies to (almost) arbitrary convex constraints.
sdpvar x y
F1 = [[1 x y+3;[x;y+3] 1/5*eye(2)] >= 0];
F2 = [-1.5 <= x-y <= 1.5,-1.5 <= x+y <= 1.5];
H = hull(F1,F2);
plot(H,[x y]);hold on
At the moment, the command does not support constraints that involve nonlinear expression (beyond quadratic or graph-represented).