span>
<span class="comment">%                       y_i'*P*y_i + q'*y_i + r &lt;= -1   for i = 1,...,M</span>
<span class="comment">%                       P &lt;= -I</span>

<span class="comment">% data generation</span>
n = 2;
rand(<span class="string">'state'</span>,0);  randn(<span class="string">'state'</span>,0);
N=50;
X = randn(2,N);  X = X*diag(0.99*rand(1,N)./sqrt(sum(X.^2)));
Y = randn(2,N);  Y = Y*diag((1.02+rand(1,N))./sqrt(sum(Y.^2)));
T = [1 -1; 2 1];  X = T*X;  Y = T*Y;

<span class="comment"