Finding column number of maximum of an array:

8 Ansichten (letzte 30 Tage)
Syed Muid Al Kais
Syed Muid Al Kais am 1 Aug. 2020
Beantwortet: Image Analyst am 1 Aug. 2020
How to find the column number of numerically max number of an array:

Antworten (1)

Image Analyst
Image Analyst am 1 Aug. 2020
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.

Kategorien

Mehr zu Cell Arrays finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by