title: Issues with quadratic programming
body: <p>I am trying to do a quadratic programming. I have an affinity matrix <code>A</code>, and I have to maximize certain function <code>x'*A*x</code>. This is basically related to feature matching i.e., matching points to labels</p>
  
  <p>This is basically related to establish a connection between dominant sets in a weighted graph and local maximizers of the quadratic function</p>
  
  <pre><code>maximize(f({x} = x^{T}A{x})
  </code></pre>
  
  <p>subject to </p>
  
  <pre><code>x \epsilon\Delta, \Delta:\sum_{j}x_j=1
  </code></pre>
  
  <p>To solve this problem I found a method called replicator equation given by Pavan and Pelillo IEEE PAMI 2007</p>
  
  <p>Once an initialization <code>x(1)</code> is given, the discrete replicator equation can be used to obtain a local solution x<sup>*</sup></p>
  
  <pre><code>x_i(t+1) = x_i(t+1) \frac{(Ax(t))_i}{x(t)^TAx(t)}
  </code></pre>
  
  <p>I get the right results when I use the replicator equation. However, when I try to solve it using matlab's quadprog function like this </p>
  
  <pre><code>X = quadprog(-A,[],[],[],Aeq,Beq,s);
  </code></pre>
  
  <p>I don't get the right values. Suppose I want to match 7 points with 7 labels, I define my affinity matrix and then use the above. However, using replicator equation I get the right results. But using just quadprog doesn't give me the right results. Any suggestions?</p>
  
  <p>Am I doing something wrong?</p>