0
$\begingroup$

I want to maximize an objective function using quasi-newton optimization method. But i couldn't find any function for maximizing a function. All inbuilt functions are for minimization. For eg. fminunc in matlab. How can i change my objective function to give it as an input to a minimization function, say fminunc and get the result for maximization.

$\endgroup$
  • 1
    $\begingroup$ Have you tried multiplying your entire objective function by (-1) ? $\endgroup$ – Paul Sep 19 '15 at 16:47
4
$\begingroup$

If you want to maximize f(X) subject to specified constraints (if any), then minimize -f(X) subject to those same constraints. Your optimal objective function will be the negative of -f(X_optimal), where X_optimal is the optimal argument value, which is the same for max f(X) and min -f(X).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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