Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to do a quadratic programming. I have an affinity matrix A, and I have to maximize certain function x'Ax. This is basically related to feature matching i.e matching points to labels

This is basically related to establish a connection between dominant sets in a weighted graph and local maximizers of the quadratic function

$maximize(f({x} = x^{T}A{x})$

subject to

$x \epsilon\Delta, \Delta:\sum_{j}x_j=1$

To solve this problem I found a method called replicator equation given by Pavan and Pelillo IEEE PAMI 2007

Once an initialization x(1) is given, the discrete replicator equation can be used to obtain a local solution $x^{*}$

$x_i(t+1) = x_i(t+1) \frac{(Ax(t))_i}{x(t)^TAx(t)}$

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


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?

share|cite|improve this question

Do you require that the weights to be nonnegative? If so, you should also specify that in the function call. Without specification, the minimum (respectively, maximum) given by Matlab would be lower (resp. higher) than the true value.

share|cite|improve this answer
Yeah, I have define that constraint in s – user34790 Dec 7 '12 at 23:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.