How to find the maximum number in each row in a variable.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Lester Lim
el 24 de En. de 2013
Comentada: Bethelhem Biru
el 10 de Dic. de 2020
Lets say I have the following matrix:
1 2 3 4 5
2 3 3 3 3
2 2 2 2 5
how should I use max to get the larget number per row?
0 comentarios
Respuesta aceptada
Walter Roberson
el 24 de En. de 2013
max(YourArray, [], 2)
2 comentarios
Bethelhem Biru
el 10 de Dic. de 2020
this will sisplay as a column matrix, if you want it to display as a row matrix, use the ' sign, for transposition. :)
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!