Finding identical rows in 2 tables

29 visualizaciones (últimos 30 días)
Vincent Ouellet
Vincent Ouellet el 2 de Abr. de 2020
Comentada: Vincent Ouellet el 2 de Abr. de 2020
Hi everyone, I think my question is relatively easy to answer, but for some reason I can't seam to get it right. Any help will be apreciated.
Let's say I have a table A that has N rows and M columns. i have an other table B that has N+X rows and M columns. Table B contains all the rows in A, plus other rows.
I would like, for every row, to create a variable that takes the value 1 if this row is in table A, and that takes the value 0 if this row isn't in Table A.
Thanks in advance.

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 2 de Abr. de 2020
look for doc in "doc ismember". There is an example for table rows found in another table.
  1 comentario
Vincent Ouellet
Vincent Ouellet el 2 de Abr. de 2020
Thank you very much, didn't think it was that simple!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by