Hi, can anyone kindly help me to answer this..? thank you.
조회 수: 1 (최근 30일)
이전 댓글 표시
how to find this..?
d=arg max min(pk[1], pk2[2])
댓글 수: 2
답변 (2개)
Utkarsh Belwal
2020년 12월 3일
Hi,
If you are trying to get the index of the maximum element along with the maximum value then refer to the below statement:
[M,I] = max([pk(1), pk2(2)]);
For more infomration refer to the documentation link: https://www.mathworks.com/help/matlab/ref/max.html
Walter Roberson
2020년 12월 6일
l = linspace(-5,5); %or whatever
pk = 5*l/5*3;
pk2 = 6*4/3;
[~, d] = max(min(pk, pk2));
d is now the index into l such that the min() of those two values is maximized.
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!