How to find the value that Maximize an argument

7 visualizzazioni (ultimi 30 giorni)
Evans Gyan
Evans Gyan il 21 Dic 2018
Commentato: Evans Gyan il 21 Dic 2018
%Given the following information,
gamma = 6.3;
sigma = 1.5;
Q = [1; 6.5 ;4 ;6];
Pd = log(1+gamma*(Q*sigma+1))
sed = sum(Pd)
I want to find the value of Q which maximizes the argument Pd.
Simply put, which Q value results in the maximum value of Pd.
Your input is highly appreciable.
Thanks in advance
  2 Commenti
Rik
Rik il 21 Dic 2018
Just looking at that formula, it becomes apparent that Pd will increase for an increasing Q, which means Pd will tend to infinity when Q tends to infinity.
Is that the answer you are looking for?
Evans Gyan
Evans Gyan il 21 Dic 2018
Rik, i want to know how to return that value in Q that only makes Pd achieve the highest value.

Accedi per commentare.

Risposte (1)

John D'Errico
John D'Errico il 21 Dic 2018
Modificato: John D'Errico il 21 Dic 2018
Normally functions like fminsearch and fminbnd minimize their objective. There are also many tools in the optimization toolbox, as well as the global optimization toolbox. Again, they are all minimizers in general. But nothing stops you from taking the negative of that objective function. So if X is a minimizer of -f(X), then X is a maximizer of f(X).
So you have many tools available that can solve your general problem. Since you have a single variable problem, then normally you would use the simplest tool available, i.e., fminbnd.
However, here you seem to be asking to find Q such that the function Pd(Q) is maximized. And since that relationship is unbounded, finding a maximum is impossible.
gamma = 6.3;
sigma = 1.5;
Pd = @(Q) log(1+gamma*(Q*sigma+1))
Pd =
function_handle with value:
@(Q)log(1+gamma*(Q*sigma+1))
ezplot(Pd)
So Pd is a very simple function. If we can increase Q without limit, then it will also increase the value of Pd(Q). We would say that Pd is unbounded as a function of Q. This is true even though Pd is a very slowly rising function of Q. It still goes up forever, with no upward bound to that value.
You can even prove that no value of Q can exist that maximizes Pd. (Hint, take the derivative of Pd with respect to Q.)
  6 Commenti
Evans Gyan
Evans Gyan il 21 Dic 2018
Yes Rik. In this example the count is 4.Let assume the count is infinity, how do i go about it
Evans Gyan
Evans Gyan il 21 Dic 2018
@madhan ravi, Thank you for your solution. Thats exactly what i wanted. It worked perfectly

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by