How can I find the maximum value in a matrix?
Show older comments
How can I find the maximum value in a matrix and find its column and row number of this value?
Accepted Answer
More Answers (1)
Image Analyst
on 14 Jun 2013
maxValue = max(yourMatrix);
[row column] = find(yourMatrix==maxValue);
Or you can take the second returned argument from max() and use ind2sub().
Categories
Find more on Matrix Decomposition in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!