How to find the value that Maximize an argument

9 ビュー (過去 30 日間)
Evans Gyan
Evans Gyan 2018 年 12 月 21 日
コメント済み: Evans Gyan 2018 年 12 月 21 日
%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 Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by