Hey my Matlab friends:
I have a maxtrix (176*250), but for simplicity, I will use a 4*4 matrix to ask questions,
suppose I have a matrix A
A = [0 0 0 0; -15 -15 -15 -15; -65 -18 3 17; -1 3 4 18]
I must to start in row 1, but isn´t maximum in there, now I must follow in row 2 but isn´t maximum in there, Now in row 3 there are nonzero and positive values. My question is how to ask matlab return me a value that can tell me the location of this max value of the first row found with nonzero and positive values (row 3 column 4)?
Thanks!!!
YH
Best Answer