2013-10-27 3 views

답변

5
다음과 같이 할 수

:

[value, location] = max(I(:)); 
[row,col] = ind2sub(size(I), location); 

>> [row, col]        

ans = 

    2  2 
3

당신은 다음과 같이 인덱스를 얻을 수 있습니다 :

[~, idx] = max(I(:)) 

를하고 사용이

I(idx) 
1

을 아니면 find을 사용할 수

[row, col] = find(I == max(I(:))) 
row = 2 
col = 2 
관련 문제