Finding column number of maximum of an array:

8 次查看(过去 30 天)
How to find the column number of numerically max number of an array:

回答(1 个)

Image Analyst
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.

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by