Suppose I have an array, a = [2 5 4 7]. What is the function returning the maximum value and its index?
a = [2 5 4 7]
For example, in my case that function should ret
This will return the maximum value in a matrix
max(M1(:))
This will return the row and the column of that value
[x,y]=ind2sub(size(M1),max(M1(:)))
For minimum just swap the word max with min and that's all.