MATLAB Answers

gamultiobj: How do I minimize one function and maximize the other

6 views (last 30 days)
Devdatt Thengdi
Devdatt Thengdi on 13 Mar 2018
Commented: Kurt Stewart on 12 Sep 2019
Given: function 2 is dependent upon function 1.

  4 Comments

Show 1 older comment
Devdatt Thengdi
Devdatt Thengdi on 13 Mar 2018
Thanks. What if I wanted to maximize a single function? I tried:
@(x)-Lobo(x(1), x(2), x(3), x(4), x(5))
I didn't work. It's still minimizing.
Walter Roberson
Walter Roberson on 13 Mar 2018
Yes, but it is minimizing the negative of the value, which is the same as maximizing the value.
Torsten
Torsten on 14 Mar 2018
If I wanted to maximize a single function, I would not use gamultiobj.

Sign in to comment.

Answers (1)

Kurt Stewart
Kurt Stewart on 12 Sep 2019
To find the maximum, if the function is positive, shift it down (subtract a really big value) such that it is completely negative and then take the aboslute value. You will find your x where the maximum is.... then plug it into the original function and you will find your maximum

Sign in to answer this question.