X = ...;x = sdpvar(2,N);w = sdpvar(2,1);for i=1:N constraints=[constraints ismember(x(:,i)+w,X)];end
x = sdpvar(2,1);P = -1 <= x <= 2;Q = 3 <= x <= 4;% Plot the two setsplot(P);plot(Q)% The set involving both P and Q is of course empty, as the same x is used in bothplot([P,Q])
x=sdpvar(2,1);
P=eye(2);
X1=[x'*P*x<=1];
X2=[x'*P*x<=2];
x=sdpvar(2,1);
y=sdpvar(2,1);
X1=[x'*P*x<=1];
X2=[y'*P*y<=2]; %Typo corrected