How to find the value that Maximize an argument

9 次查看(过去 30 天)
%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 个评论
Rik
Rik 2018-12-21
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 2018-12-21
Rik, i want to know how to return that value in Q that only makes Pd achieve the highest value.

请先登录,再进行评论。

回答(1 个)

John D'Errico
John D'Errico 2018-12-21
编辑:John D'Errico 2018-12-21
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 个评论
Evans Gyan
Evans Gyan 2018-12-21
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 2018-12-21
@madhan ravi, Thank you for your solution. Thats exactly what i wanted. It worked perfectly

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by