How to find the value that Maximize an argument
조회 수: 7 (최근 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
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?
답변 (1개)
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.)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!