Finding column number of maximum of an array:
8 次查看(过去 30 天)
显示 更早的评论
How to find the column number of numerically max number of an array:
0 个评论
回答(1 个)
Image Analyst
2020-8-1
It could appear in more than one location. So do it this way:
maxValue = max(yourArray(:))
[rows, columns] = find(yourArray == maxValue)
columns will show you all the columns where the max value occurs.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!