ass="string">sdp</span> <span class="string">quiet</span>
        variable <span class="string">S(n,n)</span> <span class="string">symmetric</span>
        maximize <span class="string">log_det(S)</span> <span class="string">-</span> <span class="string">trace(S*Y)</span> <span class="string">-</span> <span class="string">lambda(i)*sum(sum(abs(S)))</span>
        S &gt;= 0
    cvx_end
    nnz(i) = sum(S(:)&gt;1e-4);
<span class="keyword">end</span>

figure;
semilogx(lambda, nnz);
hold <span class="string">o