I have a problem in matlab. I want to take last column of a 12094*3 matrix within specific criteria. 12094*3 matrix has three columns which are lattiutude, longitude and magnitude in order. I have another matrix has two columns which are longitudes and lattitudes and this matrix is a closed region. In my code c is closed region matrix and all is 12094*3 matrix. If lattitudes and longitudes of c are same with all matrix, it should take last column which is magnitude M. However, when i run the code it gives wrong values. There seems like that there are seven 6.9418, but it is not.
True values are last colum and there is only one 6.9418.
I found this error for only 36.5 and 25.5, but i think there are more mistakes.
My code is:
if ((all(i,1)==c(j,1)) && (all(i,2)==c(j,2)))