ng">sdp</span>
  <span class="comment">% A is a PSD symmetric matrix (n-by-n)</span>
  variable <span class="string">A(n,n)</span> <span class="string">symmetric</span>;
  A &gt;= 0;

  <span class="comment">% constrained matrix entries.</span>
  A(1,1) == 3;
  A(2,2) == 2;
  A(3,3) == 1;
  A(4,4) == 5;
  <span class="comment">% Note that because A is symmetric, these off-diagonal</span>
  <span class="comment">% constraints affect the corresponding element on the</span>
  <span class="comment">% opposite s