Finding column number of maximum of an array:

9 vues (au cours des 30 derniers jours)
Syed Muid Al Kais
Syed Muid Al Kais le 1 Août 2020
How to find the column number of numerically max number of an array:

Réponses (1)

Image Analyst
Image Analyst le 1 Août 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.

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by