MATLAB: How to find the index of the highest negative element in a two dimensional matrix

index of most negative elementindex of most positive element

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.

Best Answer

[row,col]=find(A==min(A(A<0)))