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.
-
1$\begingroup$ Have you tried multiplying your entire objective function by (-1) ? $\endgroup$ – Paul♦ Sep 19 '15 at 16:47
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).