If a value in one matrix matches that in another matrix, how do I assign the same index number?
Show older comments
I have a matrix with a list of latitude and longitude coordinates (64,800x3). Each latitude and longitude pair have their own index number.
Ex.
[Index Lat Lon;
10521 -45.5 50.5;
10522 -45.5 51.5;
10523 -45.5 52.5]
I have another matrix with a list of latitude and longitude numbers, but no index numbers. Also, this matrix is not the same size as the previous matrix. (250x2; It has Lat and Lon only, no index number yet.)
I want to write a script that will examine the pairs of latitude and longitude coordinates for each matrix. When there is a pair that matches between the matrices, it would assign the same index number to the second matrix from the first matrix.
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!