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.

%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?)

2 Comments

Please post what is the expected result for datum1 and datum2
I just wanna check points id whether they are same or not. There is no result from datum1 and datum2

Sign in to comment.

 Accepted Answer

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

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!