Maximum values of an matrix

1 visualización (últimos 30 días)
Ricardo Gutierrez
Ricardo Gutierrez el 7 de Ag. de 2019
Respondida: Ricardo Gutierrez el 7 de Ag. de 2019
Hello good day.
I have a matrix A = [64 79 91; 87 29 31; 59 17 43]
the first maximum value of that matrix A is 91 and I get that value from
M1 = max(max (A)) = 91
How do I get the second maximum value? that is 87
I hope you can help me.
Thanks and regards.

Respuesta aceptada

madhan ravi
madhan ravi el 7 de Ag. de 2019
Values=sort(A(:),'descend');
Values(2) % 2 - second max value

Más respuestas (1)

Ricardo Gutierrez
Ricardo Gutierrez el 7 de Ag. de 2019
Thank you !!!

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by