I have a matrix T, and I have asked it to find all the rows where the value in column 5 is between 2 numbers and save these as S1.
I now want it to tell me out of rows identified, what is the highest number that appears in column 6, and tell me this number and the corresponding number in column 5.
I tried the code below but it does not work, and it gives me a x1 of 0.1310 which isnt in the range of S1. Can anybody help?
T = table2array(readtable(file.name));
S1 = T(:,5)>= 0.14 & T(:,5) <= 0.149;
[y1, idx1] = max(T(S1,6));