MATLAB: I have 2 coordinate systems. Each of them includes several common points. I wanna check that whether these common points id are the same or not.

data comparision

%for example;
datum1=[N1 100 150 200;N2 110 122 130]
datum2=[N1 120 140 300;N2 120 170 180]
%in this example I wanna check datum1's first column is equal datum2's first column. (is that N1=N1, N2=N2 in datum1 and datum2)
%point id would include only numbers
datum1=[1 100 150 200;2 110 122 130]
datum2=[1 120 140 300;2 120 170 180]
%this time there is no character exist. I wanna check datum1's first column is equal datum2's first column. So I can check points id. (is that 1=1 , 2=2 in datum1 and datum2?)

Best Answer

If you want to compare the first column of datum1 and datum2
isequal(datum1(:,1),datum2(:,1))