Find the min(or max) of the 2nd row of an unknown matrix?

4 visualizaciones (últimos 30 días)
Ammaa AlSada
Ammaa AlSada el 15 de Dic. de 2018
Comentada: madhan ravi el 16 de Dic. de 2018
matrix A(m,n)
we need to find min or max of only the 2nd row if we have a 2nd row

Respuesta aceptada

madhan ravi
madhan ravi el 15 de Dic. de 2018
Editada: madhan ravi el 15 de Dic. de 2018
[value,index]=max(A(2,:))
[Value,Index]=min(A(2,:))
  2 comentarios
John D'Errico
John D'Errico el 15 de Dic. de 2018
+1. The point being to extract the second row. Then use either min or max as you wish.
madhan ravi
madhan ravi el 16 de Dic. de 2018
Thank you John D’Errico ;-)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by