k = 0 : n-1,
        sum( diag( X, k ) ) == b( k+1 );
    end
    X == semidefinite(n);
cvx_end
</pre></div>
</div>
<p>If we wish to obtain dual information for the <span class="math">\(n\)</span> simple equality
constraints, we need a way to assign each constraint in the <tt class="docutils literal"><span class="pre">for</span></tt> loop
a separate dual variable. This is accomplished as follows:</p>
<div class="highlight-none"><div class="highlight"><pre>cvx_begin
    variable X( n, n ) symmetric
    dual 