Returning an Entire Row Based on the Max in a Column
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Erick Sirois
am 27 Jan. 2020
Kommentiert: Erick Sirois
am 27 Jan. 2020
Hi.
I'm trying to get the entire row based on the max value of a column. For example:
x = [5 6 6 9
7 3 2 4
3 12 8 4]
Now say I want the entire row belonging to the column 2 maximum value. I should get the row with 3 12 8 4 because 12 is the max value in column 2.
Is there a way to do this? I've tried the help and searching here and other places but cant seem to find it.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!