Dear All
I have a matrix of three column as below like the file provided, I would like to find the values from o or p columns which is the closest to q, I have written this code:
M=abs(o - q);N=abs(p - q);difference =[M N];[~,ii] = min(difference,[],2);if ii == 1 Result = o else Result = pend
but it just return the p column to me, I am really confused about the results. I really appreciate your helps
Best Nima
Best Answer