Dear All,
I have a vector such as A = [1 2 2 3 2 4 5 7 6 6 5 4]. As we can see that 7 is the maximum value of this vector. I want to know the location of this maximum value, in this example it is the 8th element. How find that?

 채택된 답변

Andrei Bobrov
Andrei Bobrov 2013년 11월 6일
doc max
[value,index] = max(A);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2013년 11월 6일

댓글:

2013년 11월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by