Reputation: 11
How do I solve a quadratic Maximization problem in MATLAB? It seems MATLAB only supports minimization problems, so is there a mathematical concept I can use?
Upvotes: 0
Views: 564
Reputation: 1
The above answer @Drazick seems not right.
quadprog() in matlab requires H to be positive definite. If we simply multiply (-1), -H is a negative definite matrix, which violates the requirement.
Another optimization function called fmincon( ) may help.
Upvotes: 0
Reputation: 4953
Using quadprog
function in MATLAB.
This function solves Quadratic Programming problems in MATLAB.
Of course if you want the maxima instead of the minima, you can multiply the cost function by -1.
Good Luck.
Upvotes: 1
Reputation: 2385
simply multiply by (-1) before and after using the minimization function
Upvotes: 10