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

20 ビュー (過去 30 日間)
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 件のコメント
Dennis
Dennis 2018 年 7 月 4 日
[row column]=find(A==-3)
sandeep das
sandeep das 2018 年 7 月 4 日
thanks a lot... it was really helpful

サインインしてコメントする。

採用された回答

Paolo
Paolo 2018 年 7 月 4 日
[row,col]=find(A==min(A(A<0)))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by