MATLAB: How to find the maximum value in a matrix

maximum in a matrix

How can I find the maximum value in a matrix and find its column and row number of this value?

Best Answer

A = randi(100,7,6); % your matrix
v = max(A(:)); % value
[ii,jj] = find(A == v); % row and column number