g">to</span>
    <span class="keyword">for</span> k = 1:n
      [ V*diag(lambda)*V'  e(:,k);
        e(k,:)             u(k)   ] &gt;= 0;
    <span class="keyword">end</span>
    sum(lambda) == 1;
    lambda &gt;= 0;
cvx_end
lambdaA = lambda; <span class="comment">% save the solution for confidence ellipsoids</span>

<span class="comment">% plot results</span>
figure(2)
<span class="comment">% draw ellipsoid v'*W*v &lt;= mu</span>
W = inv(V*diag(lambda)*V')^2;
mu = diag(V'*W*V);
mu = mean(mu(ind));
angles =