user3869514
user3869514

Reputation: 11

Solve maximization problem of quadratic equation in MATLAB

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

Answers (3)

Chris Qin
Chris Qin

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

Royi
Royi

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

zinjaai
zinjaai

Reputation: 2385

simply multiply by (-1) before and after using the minimization function

Upvotes: 10

Related Questions