How can I find the difference between points of two matrices if the indices do not match?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi you all, I am trying to find the difference between the x values of two n by 2 matrices, and the differences in the y values of the matrices. For each matrix the first column correspond to the x values, and the second column corresponds to the y values. They have the same size, but the indices of the x and y coordinates are not the same, which can be specially troublesome with the approach I was taking in substracting the x values and y values to findsthe difference. I attach a screenshot of the plot,in case it helps. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/209891/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/209891/image.png)
0 comentarios
Respuestas (1)
Walter Roberson
el 23 de Mzo. de 2019
pdist2() and look for the minimum distance.
Or, sortrows() both of them and assume that they match up after that.
0 comentarios
Ver también
Categorías
Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!