Compare two matrices by 2 columns and erase the different rows
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jandry Cabrera
el 21 de En. de 2020
Comentada: Jandry Cabrera
el 21 de En. de 2020
Hi, i have two matrices of coordeantes of different row size (#node x y z). I need to compare them and pick the rows that share same coordenates x and y between the two matrices, so the result would be a second matrix with the same row size as the first one. Basically I need to find the same points but in another z value. Any help with that will be appreciated :) Thanks!
0 comentarios
Respuesta aceptada
Walter Roberson
el 21 de En. de 2020
[has_a_match, row_index_in_second_matrix] = ismember(XYFromFirstMatrix, XYFromSecondMatrix, 'rows');
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!