Effacer les filtres
Effacer les filtres

how to find the index of the highest negative element in a two dimensional matrix?

20 vues (au cours des 30 derniers jours)
suppose I have a two dimensional matrix having positive and negative elements. I want to find the index of the element which is the most negative element in the matrix. the index should give information about the row and column in which the element is present.
  4 commentaires
Dennis
Dennis le 4 Juil 2018
[row column]=find(A==-3)
sandeep das
sandeep das le 4 Juil 2018
thanks a lot... it was really helpful

Connectez-vous pour commenter.

Réponse acceptée

Paolo
Paolo le 4 Juil 2018
[row,col]=find(A==min(A(A<0)))

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by